Enterprise Content Types and PNP Provisioning

%3CLINGO-SUB%20id%3D%22lingo-sub-89351%22%20slang%3D%22en-US%22%3EEnterprise%20Content%20Types%20and%20PNP%20Provisioning%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-89351%22%20slang%3D%22en-US%22%3E%3CP%3EAre%20there%20any%20special%20considerations%20for%20PNP%20Provisioning%20of%20Lists%20when%20using%20Enterprise%20Content%20Types%3F%20I%20see%20that%20I%20can%20use%20PNP%20to%20create%20the%20content%20type%20in%20the%20Content%20Type%20Hub%20by%20getting%20a%20reference%20with%3A%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FSharePoint%2FPnP-PowerShell%2Fblob%2Fmaster%2FDocumentation%2FGetPnPContentTypePublishingHubUrl.md%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EGet%E2%80%91PnPContentTypePublishingHubUrl%3C%2FA%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EThen%20I%20can%20Publish%20the%20content%20type%20manually.%3C%2FP%3E%3CP%3EWhat%20I%20am%20wondering%20is%20when%20provisioning%20the%20site%20and%20then%20creating%20associated%20lists%20with%20the%20Content%20Type%20ID%20of%20the%20Enterprise%20Content%20Type%20is%20there%20anything%20I%20need%20to%20plan%20for%20in%20my%20template%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-89351%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPnP%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-90240%22%20slang%3D%22en-US%22%3ERe%3A%20Enterprise%20Content%20Types%20and%20PNP%20Provisioning%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-90240%22%20slang%3D%22en-US%22%3E%3CP%3EThanks!%20I%20was%20planning%20on%20using%20the%20same%20Content%20Type%20ID%20when%20I%20provisioned%20the%20Enterprise%20Content%20Type%20(using%20PNP%20to%20do%20the%20initial%20creation%20of%20the%20content%20type%20in%20the%20CT%20Hub)%20so%20I%20can%20keep%20the%20ID%20the%20same%20across%20tenants.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'll%20keep%20testing%2C%20but%20so%20far%20I%20haven't%20found%20a%20problem.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-90189%22%20slang%3D%22en-US%22%3ERe%3A%20Enterprise%20Content%20Types%20and%20PNP%20Provisioning%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-90189%22%20slang%3D%22en-US%22%3E%3CP%3EAs%20long%20as%20the%20source%20of%20the%20pnp%20file%20and%20the%20target%20are%20in%20the%20same%20tenant%2C%20not%20a%20problem.%3C%2FP%3E%3CP%3EThe%20content%20types%20from%20the%20hub%20will%20be%20in%20the%20site%20before%20the%20PnP%20file%20is%20processed.%3C%2FP%3E%3CP%3EIf%20the%20pnp%20is%20from%20a%20different%20tenant%20then%20the%20Guids%20won't%20match%20and%20you'll%20get%20duplicate%20field%20errors%2C%3C%2FP%3E%3CP%3EDave%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-89664%22%20slang%3D%22en-US%22%3ERe%3A%20Enterprise%20Content%20Types%20and%20PNP%20Provisioning%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-89664%22%20slang%3D%22en-US%22%3E%3CP%3EPaul%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks!%20My%20first%20test%20was%20a%20success%2C%20though%20the%20site%20had%20been%20running%20for%20a%20day%20or%20so.%20This%20would%20mean%20that%20the%20Enterprise%20Content%20Type%20was%20present%20on%20the%20site.%20I'll%20do%20a%20bit%20more%20testing%20later%20this%20week%20to%20see%20if%20there%20is%20an%20issue%20of%20timing%20following%20provisioning.%20I%20may%20just%20have%20to%20test%20the%20site%20for%20the%20Content%20Type%20prior%20to%20continuing%20with%20my%20code.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-89585%22%20slang%3D%22en-US%22%3ERe%3A%20Enterprise%20Content%20Types%20and%20PNP%20Provisioning%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-89585%22%20slang%3D%22en-US%22%3E%3CP%3EGood%20question%20at%20the%20moment%20i%20am%20removing%20things%20from%20contenttype%20hub%20and%20move%20it%20in%20to%201%20site%20if%20needed.%3C%2FP%3E%3CP%3EHave%20not%20yet%20tested%20this%20functionality.%20But%20i%20imagine%20that%20when%20you%20create%20the%20sitecollection%20the%20contenttype%20hub%20is%20published%20after%20that%20pnp%20kicks%20in.%20But%20could%20be%20wrong%20here.%3C%2FP%3E%3C%2FLINGO-BODY%3E
MVP

Are there any special considerations for PNP Provisioning of Lists when using Enterprise Content Types? I see that I can use PNP to create the content type in the Content Type Hub by getting a reference with:

Get‑PnPContentTypePublishingHubUrl

Then I can Publish the content type manually.

What I am wondering is when provisioning the site and then creating associated lists with the Content Type ID of the Enterprise Content Type is there anything I need to plan for in my template?

4 Replies

Good question at the moment i am removing things from contenttype hub and move it in to 1 site if needed.

Have not yet tested this functionality. But i imagine that when you create the sitecollection the contenttype hub is published after that pnp kicks in. But could be wrong here.

Paul,

 

Thanks! My first test was a success, though the site had been running for a day or so. This would mean that the Enterprise Content Type was present on the site. I'll do a bit more testing later this week to see if there is an issue of timing following provisioning. I may just have to test the site for the Content Type prior to continuing with my code.

 

 

As long as the source of the pnp file and the target are in the same tenant, not a problem.

The content types from the hub will be in the site before the PnP file is processed.

If the pnp is from a different tenant then the Guids won't match and you'll get duplicate field errors,

Dave 

Thanks! I was planning on using the same Content Type ID when I provisioned the Enterprise Content Type (using PNP to do the initial creation of the content type in the CT Hub) so I can keep the ID the same across tenants.

 

I'll keep testing, but so far I haven't found a problem.