pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
987 stars 665 forks source link

Apply-PnPProvisioningTemplate : Could not load file or assembly 'System.IdentityModel.Tokens.Jwt, Version=5.2.4.0 #1673

Closed adamdale closed 5 years ago

adamdale commented 5 years ago

Reporting an Issue or Missing Feature

Apply-PnPProvisioningTemplate errors

Expected behavior

Process XML to create a list.

Actual behavior

Apply-PnPProvisioningTemplate : Could not load file or assembly 'System.IdentityModel.Tokens.Jwt, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. At line:1 char:1

Steps to reproduce behavior

  1. Open elevated SharePoint Online Management Shell
  2. Connect-PnPOnline https://tenant.sharepoint.com/sites/dev -Credentials creds
  3. Apply-PnPProvisioningTemplate -Path C:\spfx\provisioning-engine\list.xml

Which version of the PnP-PowerShell Cmdlets are you using?

What is the version of the Cmdlet module you are running?

3.0.1808.0

How did you install the PnP-PowerShell Cmdlets?

Other info

When I install via MSI the following location is missing a DLL for System.IdentityModel.Tokens.Jwt;

C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell

When I install via PowerShell Gallery this location contains a dll for System.IdentityModel.Tokens.Jwt but the version is 4.0.10819.1000 not 5.2.4.0 as the console states.

Frost-on-Web commented 5 years ago

Already reported into #1286 . Please to comment this other thread. Thanks.

adamdale commented 5 years ago

So it looks like August 2018 Intermediate Release 1 has fixed this issue for me :D .

Since I downloaded the latest MSI from GitHub (Cmdlet module 3.0.18.08.1) I haven't had any issues with this.

Many thanks!

VidhiB07 commented 4 years ago

It's not fixed , I'm facing same issue for new version SharePointPnPPowerShellOnline/3.23.2007.0:

[Error] Connect-PnPOnline : Could not load file or assembly 'System.IdentityModel.Tokens.Jwt, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.