Best practice for provisioning Content Types on Modern Sites



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.






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

@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....

@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.



@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? 




@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).

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.

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

@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.

@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.

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.