PnP icon indicating copy to clipboard operation
PnP copied to clipboard

SharePointPnPCore2016 ApplyProvisioningTemplate in timer job throwing: Could not load file or assembly 'System.IdentityModel.Tokens.Jwt, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies

Open bricenocar opened this issue 6 years ago • 0 comments

Category

[x ] Bug [ ] Enhancement

Environment

[ ] Office 365 / SharePoint Online [x ] SharePoint 2016 [ ] SharePoint 2013

Expected or Desired Behavior

Apply the provisioning template to an existing site

Observed Behavior

After getting the Web via csom, I call ApplyProvisioningTemplate and get the error: 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.

Steps to Reproduce

These steps are executed in a TimerJob: 1.- Connect to a web by using csom. (elevated privileges) 2.- Apply PnP provisioning template.

Additional Information

I installed packages using NuGet, the package installed: SharePointPnPCore2016 version 3.3.1811.

I tried executing the same code with same version of SharePointPnPCore2016 in a console app and it works.

bricenocar avatar Dec 02 '18 10:12 bricenocar