Best practice for provisioning content types in modern team sites

Copper Contributor

We have a requirement to provision sites using a form we are building in SPFX web part to restrict who can create specific sites. This process requires lot of inputs from user to provision site and set default values in the site before users start using it. 


At the moment we have below requirements: 

  • Use of Document Set. 
  • Inherit content types from Content type hub
  • Provision lists and libraries
  • Associate the content type to the lists and libraries
  • Add default content to lists and libraries


We are using site design scripts for provisioning lists and libraries. Using site design scripts, Creation of content types from hub is not available, enabling of site collection features not available, adding of content to lists and library is not available. 


Solution tried

1. Azure Automation - Written PowerShell script and wait for time till content types are synced to newly created sites (~30 mins). After site content types are available we are adding them to lists and libraries. And then adding default content to lists and libraries. But, problem is time taking and not sure if content types are synced 30 mins, sometimes we see over an hour. Script is growing over time for additional customization etc. 

2. Pnp Provisioning  - Use PnP provisioning template to download the schema from a existing site and then use that template to create site. This one has its own issues. 


At the moment for production use I like to know what is the best practice people are following to provision a modern site which uses content type hub content types?? If we use same content type id, name and fields in it in PnP provisioning template, are there any problems when the site syncs from content type hub in next run?





4 Replies

@Praveen_Battula - The Content Type Hub has always been a great idea, but the variation in replication times is very frustrating.  I think you can create content types using the Same ID, but you'll have to test it and it should be fairly easy to setup a test like that.  Choose a content type that you already have on the CT Hub and create it with the same id on a test site.  Then check the Content Type Publishing error log for errors ( _layouts/15/contenttypesyndicationhubs.aspx ). You may have to wait awhile.   Good Luck

Thanks @Gregory Frick.

I have tried them and used same content type Id and site fields and fieldref in content types. But I do see the error messages in content type publishing error log as conflicts. But this conflict error message only gets for few content types not to all content types.

So I am not sure what is the best practice here to implement these kind of requirements with modern sharepoint.

At the moment we have implemented azure automation runbook which waits till content types available and then finish post provisiong steps. Sometime we see 1 hr to 2 hr to show up content types. We are unnecessarily paying for runtime in azure, also customers are waiting for hours to show up site for use. I feel like there must be better solution to make things simple.




Im having the same issue myself.

I just put a delay in the Flow using the delay trigger. 
I would like to know if possible how you check when content types are available?

just a quick update: Looks like Microsoft is planning to release modernized content type gallery, term store this quarter. See more details here: