pnp/PnP-Sites-Core

Apply-PnPProvisioningTemplate has stopped working since 2018-10-03 (exception when provisioning ListInstances)

Closed this issue ยท 4 comments

Category

[X] Bug
[ ] Enhancement

Environment

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

Expected or Desired Behavior

Apply-PnPProvisioningTemplate throws an exception (since today) when provisioning ListInstances. Expected behaviour is that provisioning templates that includes list instances should work. It worked yesterday (2018-10-02) so there is likely some change that has been made that breaks the exisiting functionality. Version: SharePointPnPPowerShellOnline 2.26.1805.1

Observed Behavior

When trying to apply a provisioning template that includes list instances, the following exception is thrown at step ListInstances:

PS C:\temp2\temp> Apply-PnPProvisioningTemplate -Path .\new2.xml
Apply-PnPProvisioningTemplate : Specified method is not supported.
At line:1 char:1

  • Apply-PnPProvisioningTemplate -Path .\new2.xml
  •   + CategoryInfo          : WriteError: (:) [Apply-PnPProvisioningTemplate], ServerException
      + FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Provisioning.ApplyProvisioningTemplate
    
    

Steps to Reproduce

We can reproduce both with our current provisioning template. It can also be reproduced by taking any site with a document library added, getting the provisioning template with Get-PnPProvisioningTemplate and include the ListInstance handler. Then apply the provisioning template on a blank site. We get the same behaviour across several different tenants.

I also have this issue currently. Worked yesterday.. Broken today. Using May 2018 release. My ListInstance xml has one content type in it. The list gets created but no content type is added. When i run it again the List is updated with the correct content type.. So error only happens when creating this list not updating.

@spdavid After some research we managed to find out what was causing the issue for us. In our libraries we had set MaxVersionLimit="0", which is the same as not setting any explicit maximum number of versions to keep. Apparently this is not possible any more. After changing the value to the maximum supported value (50.000) it started working again.

Works for me as well. Thanks for sharing the solution ๐Ÿ‘

@ChrisAV81 Thanks for the fix! It started failing on several tenants on different moments. It seems like a Microsoft update introduced this?