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