Connecting to SP2016 using PnP

2018-03-09 08:52:52

I've used PnP a fair amount in the past when working with SharePoint Online, I'm now using it against a SharePoint 2016 on-prem environment. However, I'm having trouble getting connected.

The SP2016 farm sits behind ADFS...

When trying to connect, i'm using the following:

Connect-PnpOnline -Url https://collab.myCorp.com -Credentials 'O365Creds' -UseAdfs

I'm using the latest PnP modules, and storing my username and pwd in the credential manager.

The error I'm seeing is:

Connect-PnpOnline : Exception has been thrown by the target of an invocation.

At line:2 char:1

+ Connect-PnpOnline -Url https://coll.myCorp.com -Credentials ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : NotSpecified: (:) [Connect-PnPOnline], TargetInvocationException

+ FullyQualifiedErrorId : System.Reflection.TargetInvocationException,SharePointPnP.PowerShell.Commands.Base.ConnectOnline

If I don't use the -adfs flag (as a test) I se