Pnp-powershell: Connect-SPOnline throws error when using AppId and AppSecret

Created on 17 Sep 2016  路  7Comments  路  Source: pnp/PnP-PowerShell

Issue: I get the below error when trying to connect SharePoint online with AppID,AppSecret and Url
Connect-SPOnline : Could not load file or assembly 'Microsoft.IdentityModel.Extensions, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=69c3241e6f0468ca' or one of its dependencies. The system cannot find the file specified.

Have installed Install-Module SharePointPnPPowerShellOnline on Windows 10. Am able to connect SharePoint online with user credentials. The issue only happens when trying to connect with AppId and AppSecret.

In windows 10, have added the feature to install Windows Identity Foundation 3.5. What would be the suggested way to get the missing DLL as highlighted in the error?

All 7 comments

Thank you for reporting this. We will include the correct DLLs in the setup, which will come with the November 2017 release.

This issue still seems to exist with Connect-PnPOnline, any updates or workarounds?

I've run into this issue as well. It appears that there was a commit (3f385b4) just after the January 2017 release (merged into the dev branch via #657) to start referencing a modified version of Microsoft.IdentityModel.Extensions that is now available as a NuGet package.

I'm hopeful that the next release will include this commit and resolve this issue with the Connect-SPOnline cmdlet.

+1

@DavidLozzi, I believe the latest release (from Friday) will resolve this issue. Still need to test it though. Will be doing so later this week.

it works with the latest!

I was able to successfully test this afternoon as well - it is now working with the latest version (Feb 2017 release).

@rosh2905, @timoschwarte - FYI

@erwinvanhunen - Should this issue now be closed as resolved?

Was this page helpful?
0 / 5 - 0 ratings