0

Ok I an trying to deploy a PnP provisioning template to a site collection. I am running into the following errors and have had no luck so far. This is a more in detail post of my commands and logs.

> Connect-PnPOnline -Url "site collection" 
> Apply-PnPProvisioningTemplate -Path "template.xml"


WARNING: List Graphics (Graphics, ####) exists but is of a different type. Skipping
list.
Apply-PnPProvisioningTemplate : Object reference not set to an instance of an object.
At line:1 char:1
+ Apply-PnPProvisioningTemplate -Path "Template.xml" -Exclude ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (:) [Apply-PnPProvisioningTemplate], NullReferenceException
    + FullyQualifiedErrorId : EXCEPTION,PnP.PowerShell.Commands.Provisioning.Site.ApplyProvisioningTemplate

I started a log file after this to at the recommendation of another user on here. In that log file I am getting a few errors.

set-pnptracelog -on -logfile traceoutput.txt

powershell.exe Warning: 0 : 2020-08-26 10:53:49.9215    [Site Security] [16]    [Information]   Failed to EnsureUser c:0o.c|federateddirectoryclaimprovider|##### 4715ms    ######
powershell.exe Error: 0 : 2020-08-26 10:53:51.1575  [OfficeDevPnP.Core] [0] [Error] ExecuteQuery threw following exception: Microsoft.SharePoint.Client.ServerException: The specified user c:0o.c|federateddirectoryclaimprovider| ##### could not be found.
Server Details:
powershell.exe Error: 0 : 2020-08-26 10:54:50.2331  [List instances]    [16]    [Error] Error during webhook add/update: AADSTS65001: The user or administrator has not consented to use the application with ID '#####' named 'PnP Management Shell'. Send an interactive authorization request for this user and resource.

After running this another user on here recommended I run the pnp provisioning template while excluding the security handlers. This did not work either.

Apply-PnPProvisioningTemplate -Path "Template.xml" -ExcludeHandlers SiteSecurity

Note: Running the latest version of SharePointPnPPowerShellOnlien 3.24.2008.1

hittle08
  • 21
  • 5

1 Answers1

0

Remove the webhooks section of listInstance in provisioning template as most webhooks are useless anyway for provisioning (Power Automate trigger mostly).

Nimantha
  • 6,405
  • 6
  • 28
  • 69
Micael
  • 1
  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/30559388) – GeralexGR Dec 14 '21 at 10:38