Apply PnP Template Error: Urloffile


Hi Folks,

Looking to apply a template to a site using the PnP Engine, I've worked out that the custom template within a content type causes an error:


"Apply-PnPProvisioningTemplate : urlOfFile
Parameter name: Specified value is not supported for the urlOfFile parameter"


Just wondering if there is any way round this? I'm using the PnP file format not .xml



3 Replies



Have you figured this out?
To my understanding this is because of the content types. If your template do not contain the content types the error is not displayed.


If you wait a couple of hours the content types have been provisioned and you can apply the template with the content types.


As the above is not something i can work with what i did was the following.

Created a Document Library with my content types, saved it as a template.
Created a PnP template without the document library only site design.


Copied my document library template with content types to the new site, created a document library from the template. Then applied the PnP template. This seems to work but i reported it as a bug.


Let me know if you figured it out?

I have seen this is the past. This could be that there is an unpublished content type. (if you are using content type hub),. I would check that all the content types are published, wait a couple of hours as described by @Blair24 and re-try.
In my case it was a document added as template to a content type. It works fine after removing <pnp:DocumentTemplate TargetName="myTemplate.docx" /> from the exported XML File.