Best practice for provisioning content types in modern team sites

%3CLINGO-SUB%20id%3D%22lingo-sub-871054%22%20slang%3D%22en-US%22%3EBest%20practice%20for%20provisioning%20content%20types%20in%20modern%20team%20sites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-871054%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20have%20a%20requirement%20to%20provision%20sites%20using%20a%20form%20we%20are%20building%20in%20SPFX%20web%20part%20to%20restrict%20who%20can%20create%20specific%20sites.%20This%20process%20requires%20lot%20of%20inputs%20from%20user%20to%20provision%20site%20and%20set%20default%20values%20in%20the%20site%20before%20users%20start%20using%20it.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAt%20the%20moment%20we%20have%20below%20requirements%3A%26nbsp%3B%3C%2FP%3E%3CUL%3E%3CLI%3EUse%20of%20Document%20Set.%26nbsp%3B%3C%2FLI%3E%3CLI%3EInherit%20content%20types%20from%20Content%20type%20hub%3C%2FLI%3E%3CLI%3EProvision%20lists%20and%20libraries%3C%2FLI%3E%3CLI%3EAssociate%20the%20content%20type%20to%20the%20lists%20and%20libraries%3C%2FLI%3E%3CLI%3EAdd%20default%20content%20to%20lists%20and%20libraries%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3CSTRONG%3EProblem%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EWe%20are%20using%20site%20design%20scripts%20for%20provisioning%20lists%20and%20libraries.%20Using%20site%20design%20scripts%2C%20Creation%20of%20content%20types%20from%20hub%20is%20not%20available%2C%20enabling%20of%20site%20collection%20features%20not%20available%2C%20adding%20of%20content%20to%20lists%20and%20library%20is%20not%20available.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CU%3ESolution%20tried%3C%2FU%3E%3A%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E1.%20Azure%20Automation%3C%2FSTRONG%3E%20-%20Written%20PowerShell%20script%20and%20wait%20for%20time%20till%20content%20types%20are%20synced%20to%20newly%20created%20sites%20(~30%20mins).%20After%20site%20content%20types%20are%20available%20we%20are%20adding%20them%20to%20lists%20and%20libraries.%20And%20then%20adding%20default%20content%20to%20lists%20and%20libraries.%20But%2C%20problem%20is%20time%20taking%20and%20not%20sure%20if%20content%20types%20are%20synced%2030%20mins%2C%20sometimes%20we%20see%20over%20an%20hour.%20Script%20is%20growing%20over%20time%20for%20additional%20customization%20etc.%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E2.%20Pnp%20Provisioning%26nbsp%3B%3C%2FSTRONG%3E%20-%20Use%20PnP%20provisioning%20template%20to%20download%20the%20schema%20from%20a%20existing%20site%20and%20then%20use%20that%20template%20to%20create%20site.%20This%20one%20has%20its%20own%20issues.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAt%20the%20moment%20for%20production%20use%20I%20like%20to%20know%20what%20is%20the%20best%20practice%20people%20are%20following%20to%20provision%20a%20modern%20site%20which%20uses%20content%20type%20hub%20content%20types%3F%3F%20If%20we%20use%20same%20content%20type%20id%2C%20name%20and%20fields%20in%20it%20in%20PnP%20provisioning%20template%2C%20are%20there%20any%20problems%20when%20the%20site%20syncs%20from%20content%20type%20hub%20in%20next%20run%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethanks%3C%2FP%3E%3CP%3E-Praveen.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-871054%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EContent%20Type%20Hub%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPnP%20Provisioning%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-876069%22%20slang%3D%22en-US%22%3ERe%3A%20Best%20practice%20for%20provisioning%20content%20types%20in%20modern%20team%20sites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-876069%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%26nbsp%3B-%20The%20Content%20Type%20Hub%20has%20always%20been%20a%20great%20idea%2C%20but%20the%20variation%20in%20replication%20times%20is%20very%20frustrating.%26nbsp%3B%20I%20think%20you%20can%20create%20content%20types%20using%20the%20Same%20ID%2C%20but%20you'll%20have%20to%20test%20it%20and%20it%20should%20be%20fairly%20easy%20to%20setup%20a%20test%20like%20that.%26nbsp%3B%20Choose%20a%20content%20type%20that%20you%20already%20have%20on%20the%20CT%20Hub%20and%20create%20it%20with%20the%20same%20id%20on%20a%20test%20site.%26nbsp%3B%20Then%20check%20the%20Content%20Type%20Publishing%20error%20log%20for%20errors%20(%20_layouts%2F15%2Fcontenttypesyndicationhubs.aspx%20).%20You%20may%20have%20to%20wait%20awhile.%26nbsp%3B%20%26nbsp%3BGood%20Luck%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-876132%22%20slang%3D%22en-US%22%3ERe%3A%20Best%20practice%20for%20provisioning%20content%20types%20in%20modern%20team%20sites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-876132%22%20slang%3D%22en-US%22%3EThanks%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F3341%22%20target%3D%22_blank%22%3E%40Gregory%20Frick%3C%2FA%3E.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20have%20tried%20them%20and%20used%20same%20content%20type%20Id%20and%20site%20fields%20and%20fieldref%20in%20content%20types.%20But%20I%20do%20see%20the%20error%20messages%20in%20content%20type%20publishing%20error%20log%20as%20conflicts.%20But%20this%20conflict%20error%20message%20only%20gets%20for%20few%20content%20types%20not%20to%20all%20content%20types.%3CBR%20%2F%3E%3CBR%20%2F%3ESo%20I%20am%20not%20sure%20what%20is%20the%20best%20practice%20here%20to%20implement%20these%20kind%20of%20requirements%20with%20modern%20sharepoint.%3CBR%20%2F%3E%3CBR%20%2F%3EAt%20the%20moment%20we%20have%20implemented%20azure%20automation%20runbook%20which%20waits%20till%20content%20types%20available%20and%20then%20finish%20post%20provisiong%20steps.%20Sometime%20we%20see%201%20hr%20to%202%20hr%20to%20show%20up%20content%20types.%20We%20are%20unnecessarily%20paying%20for%20runtime%20in%20azure%2C%20also%20customers%20are%20waiting%20for%20hours%20to%20show%20up%20site%20for%20use.%20I%20feel%20like%20there%20must%20be%20better%20solution%20to%20make%20things%20simple.%3CBR%20%2F%3E%3CBR%20%2F%3E-Praveen.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1030060%22%20slang%3D%22en-US%22%3ERe%3A%20Best%20practice%20for%20provisioning%20content%20types%20in%20modern%20team%20sites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1030060%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%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIm%20having%20the%20same%20issue%20myself.%3C%2FP%3E%3CP%3EI%20just%20put%20a%20delay%20in%20the%20Flow%20using%20the%20delay%20trigger.%26nbsp%3B%3CBR%20%2F%3EI%20would%20like%20to%20know%20if%20possible%20how%20you%20check%20when%20content%20types%20are%20available%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1285557%22%20slang%3D%22en-US%22%3ERe%3A%20Best%20practice%20for%20provisioning%20content%20types%20in%20modern%20team%20sites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1285557%22%20slang%3D%22en-US%22%3Ejust%20a%20quick%20update%3A%20Looks%20like%20Microsoft%20is%20planning%20to%20release%20modernized%20content%20type%20gallery%2C%20term%20store%20this%20quarter.%20See%20more%20details%20here%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fmicrosoft-sharepoint-blog%2Fmodernizing-sharepoint-managed-metadata-services-mms%2Fba-p%2F1277450%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fmicrosoft-sharepoint-blog%2Fmodernizing-sharepoint-managed-metadata-services-mms%2Fba-p%2F1277450%3C%2FA%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional 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

Problem:

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?

 

thanks

-Praveen.

 

4 Replies
Highlighted

@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

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

-Praveen.
Highlighted

@Praveen_Battula 

 

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?

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

https://techcommunity.microsoft.com/t5/microsoft-sharepoint-blog/modernizing-sharepoint-managed-meta...