Apply PnP Template Error: Urloffile

%3CLINGO-SUB%20id%3D%22lingo-sub-330210%22%20slang%3D%22en-US%22%3EApply%20PnP%20Template%20Error%3A%20Urloffile%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-330210%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Folks%2C%3CBR%20%2F%3E%3CBR%20%2F%3ELooking%20to%20apply%20a%20template%20to%20a%20site%20using%20the%20PnP%20Engine%2C%20I've%20worked%20out%20that%20the%20custom%20template%20within%20a%20content%20type%20causes%20an%20error%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%22Apply-PnPProvisioningTemplate%20%3A%20urlOfFile%3CBR%20%2F%3EParameter%20name%3A%20Specified%20value%20is%20not%20supported%20for%20the%20urlOfFile%20parameter%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJust%20wondering%20if%20there%20is%20any%20way%20round%20this%3F%20I'm%20using%20the%20PnP%20file%20format%20not%20.xml%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheers!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-330210%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Econtent%20type%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPnP%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1028353%22%20slang%3D%22en-US%22%3ERe%3A%20Apply%20PnP%20Template%20Error%3A%20Urloffile%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1028353%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F247098%22%20target%3D%22_blank%22%3E%40Blair24%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHave%20you%20figured%20this%20out%3F%3CBR%20%2F%3ETo%20my%20understanding%20this%20is%20because%20of%20the%20content%20types.%20If%20your%20template%20do%20not%20contain%20the%20content%20types%20the%20error%20is%20not%20displayed.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20wait%20a%20couple%20of%20hours%20the%20content%20types%20have%20been%20provisioned%20and%20you%20can%20apply%20the%20template%20with%20the%20content%20types.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20the%20above%20is%20not%20something%20i%20can%20work%20with%20what%20i%20did%20was%20the%20following.%3C%2FP%3E%3CP%3ECreated%20a%20Document%20Library%20with%20my%20content%20types%2C%20saved%20it%20as%20a%20template.%3CBR%20%2F%3ECreated%20a%20PnP%20template%20without%20the%20document%20library%20only%20site%20design.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECopied%20my%20document%20library%20template%20with%20content%20types%20to%20the%20new%20site%2C%20created%20a%20document%20library%20from%20the%20template.%20Then%20applied%20the%20PnP%20template.%20This%20seems%20to%20work%20but%20i%20reported%20it%20as%20a%20bug.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELet%20me%20know%20if%20you%20figured%20it%20out%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2277318%22%20slang%3D%22en-US%22%3ERe%3A%20Apply%20PnP%20Template%20Error%3A%20Urloffile%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2277318%22%20slang%3D%22en-US%22%3EI%20have%20seen%20this%20is%20the%20past.%20This%20could%20be%20that%20there%20is%20an%20unpublished%20content%20type.%20(if%20you%20are%20using%20content%20type%20hub)%2C.%20I%20would%20check%20that%20all%20the%20content%20types%20are%20published%2C%20wait%20a%20couple%20of%20hours%20as%20described%20by%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F247098%22%20target%3D%22_blank%22%3E%40Blair24%3C%2FA%3E%20and%20re-try.%3C%2FLINGO-BODY%3E
Contributor

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

 

Cheers!

2 Replies

@Blair24 

 

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.