Best practice for provisioning Content Types on Modern Sites

%3CLINGO-SUB%20id%3D%22lingo-sub-271905%22%20slang%3D%22en-US%22%3EBest%20practice%20for%20provisioning%20Content%20Types%20on%20Modern%20Sites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-271905%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI'm%20looking%20for%20the%20best%20way%20to%20work%20with%20content%20types%20on%20modern%20sites.%3C%2FP%3E%3CP%3ECurrently%20the%20Content%20Type%20Hub%20(cth)%20is%26nbsp%3Bused%20for%20our%20classic%20sites%20and%26nbsp%3Bcan't%20be%20deactivated.%3C%2FP%3E%3CP%3EWe%20started%20a%20new%20project%20to%20provision%20modern%20sites%20wit%20PnP%20Provisioning%20Engine.%3C%2FP%3E%3CP%3EIf%20a%20modern%20site%20is%20created%2C%20the%20content%20types%20from%20the%20content%20type%20hub%20are%20not%20available%20for%20some%20time.%20Adding%20content%20types%20from%20the%20cth%20to%20list%20or%20libraries%20makes%20this%20impossible%20for%20the%20provisioning%20engine.%3C%2FP%3E%3CP%3EI%20see%20a%20few%20options%3C%2FP%3E%3CP%3E1.%20Create%20a%20modern%20site%20that%20won't%20get%20the%20content%20types%20from%20the%20cth%20and%20add%20create%20content%20types%20manual%20on%20the%20template%20site%20collection.%3C%2FP%3E%3CP%3EI%20don't%20see%20how%20we%20can%20technically%20make%20this%20possible...%3C%2FP%3E%3CP%3E2.%20Reuse%20the%20provisioned%20content%20types%20from%20the%20content%20type%20hub%20in%20the%20template%20site%3C%2FP%3E%3CP%3EThis%20might%20give%20a%20conflict%20when%20the%20content%20types%20are%20provisioned%20by%20the%20PnP%20Prov%20Engine%20and%20not%20by%20the%20content%20type%20hub%2C%20not%20sure%20if%20this%20is%20a%20valid%20argument.%3C%2FP%3E%3CP%3E3.%20Create%20(next%20to%20the%20one%20from%20the%20cth)%20new%20content%20types%20in%20the%20template%20site.%3C%2FP%3E%3CP%3Ethere%20will%20be%20an%20overlap%20of%20content%20types...%20This%20approach%20makes%20it%20more%20difficult%20for%20reporting%20or%20search%20queries.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20looking%20forward%20to%20your%20ideas%20or%20best%20practices.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheers%3C%2FP%3E%3CP%3EBernd%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-271905%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EContent%20Type%20Hub%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eprovisioning%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-389874%22%20slang%3D%22en-US%22%3ERe%3A%20Best%20practice%20for%20provisioning%20Content%20Types%20on%20Modern%20Sites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-389874%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F228262%22%20target%3D%22_blank%22%3E%40Francis%20Laurin%3C%2FA%3E%26nbsp%3Bwe%20are%20currently%20using%20the%20pnp%20provisioning%20engine.%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20created%20new%20content%20types%20and%20reused%20the%20fields%20from%20the%20content%20type%20hub.%3C%2FP%3E%3CP%3EIt%20is%20easy%20to%20export%20fields%20from%20existing%20sites%20with%20pnp...%20After%20you%20added%20everything%20to%20your%20template%20you%20can%20start%20provisioning.%20The%20content%20type%20hub%20will%20add%20all%20the%20other%20(unused)%20fields.%3C%2FP%3E%3CP%3ECheers%3C%2FP%3E%3CP%3EBernd%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-389666%22%20slang%3D%22en-US%22%3ERe%3A%20Best%20practice%20for%20provisioning%20Content%20Types%20on%20Modern%20Sites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-389666%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F8293%22%20target%3D%22_blank%22%3E%40Bernd%20Verhofstadt%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20did%20you%20manage%20it%20out%2C%20finally%3F%20I%20have%20the%20exact%20same%20question.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20was%20told%20that%20you%20could%20simply%20provision%20the%20same%20Content%20Type%20name%20and%20ID%20from%20a%20site%20script%20(and%20add%20it%20to%20a%20library%20at%20the%20same%20time)%20and%20the%20Content%20Type%20Hub%20would%20hook%20up%20after%20and%20add%20the%20missing%20columns.%20I%20just%20tested%20it%20and%20it%20did%20not%20work%20at%20all.%20Error%20logs%20state%20that%20the%20CT%20already%20exists....%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-274318%22%20slang%3D%22en-US%22%3ERe%3A%20Best%20practice%20for%20provisioning%20Content%20Types%20on%20Modern%20Sites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-274318%22%20slang%3D%22en-US%22%3EThat's%20a%20possible%20alternative.%20unfortunately%20these%20approach%20does%20not%20meet%20our%20requirements.%20PnP%20Provisioning%20engine%20provides%20a%20lot%20more%20flexibility.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-271932%22%20slang%3D%22en-US%22%3ERe%3A%20Best%20practice%20for%20provisioning%20Content%20Types%20on%20Modern%20Sites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-271932%22%20slang%3D%22en-US%22%3EAnother%20approach%3A%20use%20site%20scripts%20and%20site%20designs%20for%20this%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-871031%22%20slang%3D%22en-US%22%3ERe%3A%20Best%20practice%20for%20provisioning%20Content%20Types%20on%20Modern%20Sites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-871031%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F8293%22%20target%3D%22_blank%22%3E%40Bernd%20Verhofstadt%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F228262%22%20target%3D%22_blank%22%3E%40Francis%20Laurin%3C%2FA%3E%26nbsp%3BSo%20you%20have%20created%20new%20content%20types%20with%20same%20id%2C%20name%20from%20the%20content%20type%20hub%20and%20added%20all%20the%20existing%20fields%20from%20content%20type%20hub%20to%20your%20site%20design%20script%20or%20pnp%20provisioning%20engine%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20yes%2C%20did%20that%20work%20when%20the%20next%20content%20type%20sync%20happened%3F%20Are%20there%20any%20issues%20like%20when%20we%20publish%20from%20content%20type%20hub%20by%20adding%20or%20removing%20fields%20did%20that%20sync%20to%20all%20these%20site%20collection%20content%20types%20without%20any%20issue%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethanks%3C%2FP%3E%3CP%3E-Praveen.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-871067%22%20slang%3D%22en-US%22%3ERe%3A%20Best%20practice%20for%20provisioning%20Content%20Types%20on%20Modern%20Sites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-871067%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F374922%22%20target%3D%22_blank%22%3E%40Praveen_Battula%3C%2FA%3E%2C%20in%20my%20case%2C%20it%20never%20hooked%20up%20with%20the%20CT%20Hub.%20Synchronization%20logs%20showed%20error%20as%20the%20CTH%20complained%20that%20the%20columns%20already%20existed.%20I%20eliminated%20completely%20the%20CTH%20from%20my%20solution%20and%20only%20used%20Site%20Design%20and%20PNP%20Provisioning.%20It%20is%20a%20pain%20to%20update%2C%20though%20(need%20to%20update%20the%20script%2Ftemplate%20%2B%20apply%20changes%20via%20PowerShell%20on%20existing%20sites).%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-871070%22%20slang%3D%22en-US%22%3ERe%3A%20Best%20practice%20for%20provisioning%20Content%20Types%20on%20Modern%20Sites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-871070%22%20slang%3D%22en-US%22%3E%3CP%3EReading%20again%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F8293%22%20target%3D%22_blank%22%3E%40Bernd%20Verhofstadt%3C%2FA%3E%20comments%2C%20he%20says%20that%20the%20PNP%20provisioning%20should%20just%20provision%20the%20Content%20Type%20and%20not%20the%20fields%20(columns).%20This%20is%20how%20the%20CTH%20could%20pick%20it%20up%20and%20add%20the%20columns%20after.%20The%20problem%20with%20that%20is%20that%20when%20you%20provision%20a%20site%2C%20you%20expect%20to%20add%20your%20columns%20to%20list%20views%20which%20is%20impossible%20if%20you%20wait%20for%20the%20CTH%20to%20add%20them%20asynchronously%2C%20after%20the%20Site%20Design%2FPnP%20Provisioning%20application.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1335244%22%20slang%3D%22en-US%22%3ERe%3A%20Best%20practice%20for%20provisioning%20Content%20Types%20on%20Modern%20Sites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1335244%22%20slang%3D%22en-US%22%3EAre%20there%20any%20updates%20on%20this%20topic%20%3F%3CBR%20%2F%3EStill%20have%20this%20issue%20while%20provisioning%20with%20site%20design%20%26amp%3B%20site%20script%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1338852%22%20slang%3D%22en-US%22%3ERe%3A%20Best%20practice%20for%20provisioning%20Content%20Types%20on%20Modern%20Sites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1338852%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F578639%22%20target%3D%22_blank%22%3E%40Scalcagno%3C%2FA%3E%26nbsp%3BMy%20recommendation%20would%20be%20to%20avoid%20using%20the%20Content%20Type%20Hub%20in%20SharePoint%20Online.%20As%20you%20can%20see%20above%2C%20there%20are%20frequent%20syndication%20issues%20with%20it%20in%20SharePoint%20Online.%20I%20would%20just%20recommend%20deploying%20content%20types%20via%20Site%20Designs%20only.%20The%20con%20obviously%20is%20that%20you%20can't%20publish%20new%20updates%20to%20content%20types%20without%20custom%20code.%20%3CBR%20%2F%3E%3CBR%20%2F%3ESo%20be%20very%20thorough%20with%20planning%20out%20an%20Information%20Architecture.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1428942%22%20slang%3D%22en-US%22%3ERe%3A%20Best%20practice%20for%20provisioning%20Content%20Types%20on%20Modern%20Sites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1428942%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F39836%22%20target%3D%22_blank%22%3E%40Beau%20Cameron%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20published%20my%20content%20type%20in%20the%20content%20types%20hub%20in%20my%20tenant.%20They%20are%20visible%20in%26nbsp%3B%3CSTRONG%3ESubscribed%20Content%20Type.%26nbsp%3B%3C%2FSTRONG%3EI%20don't%20understand%20why%20are%20not%20visible%20for%20Modern%20Sites%20in%20my%20tenant.%20My%20tenant%20home%20site%20is%20a%20classic%20team%20site.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1441459%22%20slang%3D%22en-US%22%3ERe%3A%20Best%20practice%20for%20provisioning%20Content%20Types%20on%20Modern%20Sites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1441459%22%20slang%3D%22en-US%22%3EAs%20mentioned%20above%20in%20my%20previous%20comment%2C%20there%20are%20syndication%20issues%20that%20delay%20and%20sometimes%20prevent%20content%20types%20from%20being%20replicated%20to%20your%20sites.%20This%20is%20why%20I%20recommend%20not%20using%20the%20content%20type%20hub.%3C%2FLINGO-BODY%3E
Highlighted
Contributor

Hi,

I'm looking for the best way to work with content types on modern sites.

Currently the Content Type Hub (cth) is used for our classic sites and can't be deactivated.

We started a new project to provision modern sites wit PnP Provisioning Engine.

If a modern site is created, the content types from the content type hub are not available for some time. Adding content types from the cth to list or libraries makes this impossible for the provisioning engine.

I see a few options

1. Create a modern site that won't get the content types from the cth and add create content types manual on the template site collection.

I don't see how we can technically make this possible...

2. Reuse the provisioned content types from the content type hub in the template site

This might give a conflict when the content types are provisioned by the PnP Prov Engine and not by the content type hub, not sure if this is a valid argument.

3. Create (next to the one from the cth) new content types in the template site.

there will be an overlap of content types... This approach makes it more difficult for reporting or search queries.

 

I'm looking forward to your ideas or best practices.

 

Cheers

Bernd

 

 

11 Replies
Highlighted
Another approach: use site scripts and site designs for this
Highlighted
That's a possible alternative. unfortunately these approach does not meet our requirements. PnP Provisioning engine provides a lot more flexibility.
Highlighted

@Bernd Verhofstadt 

How did you manage it out, finally? I have the exact same question.

 

I was told that you could simply provision the same Content Type name and ID from a site script (and add it to a library at the same time) and the Content Type Hub would hook up after and add the missing columns. I just tested it and it did not work at all. Error logs state that the CT already exists....

Highlighted

@Francis Laurin we are currently using the pnp provisioning engine. 

We created new content types and reused the fields from the content type hub.

It is easy to export fields from existing sites with pnp... After you added everything to your template you can start provisioning. The content type hub will add all the other (unused) fields.

Cheers

Bernd

Highlighted

@Bernd Verhofstadt @Francis Laurin So you have created new content types with same id, name from the content type hub and added all the existing fields from content type hub to your site design script or pnp provisioning engine? 

 

If yes, did that work when the next content type sync happened? Are there any issues like when we publish from content type hub by adding or removing fields did that sync to all these site collection content types without any issue? 

 

thanks

-Praveen.

Highlighted

@Praveen_Battula, in my case, it never hooked up with the CT Hub. Synchronization logs showed error as the CTH complained that the columns already existed. I eliminated completely the CTH from my solution and only used Site Design and PNP Provisioning. It is a pain to update, though (need to update the script/template + apply changes via PowerShell on existing sites).

Highlighted

Reading again @Bernd Verhofstadt comments, he says that the PNP provisioning should just provision the Content Type and not the fields (columns). This is how the CTH could pick it up and add the columns after. The problem with that is that when you provision a site, you expect to add your columns to list views which is impossible if you wait for the CTH to add them asynchronously, after the Site Design/PnP Provisioning application.

Highlighted
Are there any updates on this topic ?
Still have this issue while provisioning with site design & site script
Highlighted

@Scalcagno My recommendation would be to avoid using the Content Type Hub in SharePoint Online. As you can see above, there are frequent syndication issues with it in SharePoint Online. I would just recommend deploying content types via Site Designs only. The con obviously is that you can't publish new updates to content types without custom code.

So be very thorough with planning out an Information Architecture.

Highlighted

@Beau Cameron 

I have published my content type in the content types hub in my tenant. They are visible in Subscribed Content Type. I don't understand why are not visible for Modern Sites in my tenant. My tenant home site is a classic team site.

Highlighted
As mentioned above in my previous comment, there are syndication issues that delay and sometimes prevent content types from being replicated to your sites. This is why I recommend not using the content type hub.