Using Apply-PnPProvisioningTemplate fails with Column '' does not exist


Hey, I am using SharePoint Online, simpoly using PnP-PowerShell to export the template from one site collection to another. No colums or content types are in the Content Type Hub, so synching them instead.


Everything works fine at export, but then when I apply it, I get one specific field that says it does not exist or may have been deleted. Everything seems to go across but assume something is failing somewhere. Any tips on how to resolve?

6 Replies

Hi Liam,


can you post your xml extract? 

Where do you get the error.

Can you run set-pnptracelog -on -level debug before the apply cmdlet.

Is it in the lookups. So a field in the lookup is used that isn't created?

Not sure if it fails on the Lookups. It just fails right now with the single field. The site column gets created but the page layouts don't seem to be created. Liam

With the set-pnptrace log cmd before the apply you will get some information about which column is missing. Can you copy the last 10 lines or so into this post?
Did you try to check the XML of your template file? I got the same error and I resolved it by removing the column from the view fields tag as shown below:
<FieldRef Name="Designation" />

Reason: The column shown in error (Designation in my case) was deleted from the list but it was present in view fields tag of XML.