Forum Discussion
PnP provisioning fails on invalid response
Deleted,
Have you looked at the tenant migration sample in PnP PowerShell. It does roughly what you are trying to do.
Which version of PnP PowerShell are you using.
My initial thought are that you need to include some connect-Pnponline commands before every Apply-PnPProvisioningTemplate. This should not be needed but it will cleanup things a bit.
Thx for the suggestion Pieter!
We have a custom c# provisioning application with PnP version 2.15.1705.0, via Nuget.
We are provisioning multiple templates for sitecollection and subsites. Would it help if new start a new context before each apply template action?
- Jul 04, 2017
Hi Deleted,
Yes, that would do the same. No guarantees that it would help but definitely worth a try.
- DeletedJul 04, 2017
Thx Pieter Veenstra
I checked the logic of our provisioning application and it already creates a new context for the sitecollection and each sub site.
Any other ideas or suggestions?
- Joao LivioJul 04, 2017Iron Contributor
Did you try
https://github.com/SharePoint/PnP-Sites-Core/issues/616Proper way
https://github.com/SharePoint/PnP-Sites-Core/blob/master/Core/OfficeDevPnP.Core/Framework/Provisioning/ObjectHandlers/SiteToTemplateConversion.cs