PnP-Sites-Core
PnP-Sites-Core copied to clipboard
[BUG] Apply-PnPProvisioningTemplate : The attempted operation is prohibited because it exceeds the list view threshold
Environment
[X] Office 365 / SharePoint Online [ ] SharePoint 2016 [ ] SharePoint 2013
Expected or Desired Behavior
PnP provisioning template successfully applied.
Observed Behavior
Apply-PnPProvisioningTemplate : The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator.
Applying provisioning template... Apply-PnPProvisioningTemplate : The attempted operation is prohibited because it exceeds the list view threshold enforc ed by the administrator. At \SharePoint\provisioning\apply-site-template.ps1:49 char:1
- Apply-PnPProvisioningTemplate -Path $templatePath
-
+ CategoryInfo : WriteError: (:) [Apply-PnPProvisioningTemplate], ServerException + FullyQualifiedErrorId : EXCEPTION,PnP.PowerShell.Commands.Provisioning.Site.ApplyProvisioningTemplate
Steps to Reproduce
The list above 5k+ list items and provisioning template is applied. It fails with the above error.
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
OK, I was able to narrow it down. It seems the bug is related to the following code:
<pnp:Files> <pnp:File Src="SiteAssets/images/default-thumbnail.jpg" Folder="SiteAssets/images" Overwrite="FALSE" /> </pnp:Files>
I have more than 5k items in my "Site Assets" library and the above fails. Any ideas on how to fix it?