SOLVED

Create multiple site collection using site design and site scripts

New Contributor

Hello Team

i have basic knowledge of site design and site scripts . first i want to create site design with below

Pre configuration 

1. Team site connected O365 group

2. document library with few folders 

3. set retention policy 

4. Add users as owners and members .

 

Using above site design , i want to create multiple site collections . 

can anyone please let me know the best practice to achieve this .

 

3 Replies
best response confirmed by YKSiddal (New Contributor)
Solution
Firsts thing you have to check is what you can do / cannot do with Site Designs:
- https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-overview
- https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-json-schema (Here you have what you can do with Site Scripts and Site Designs)
With the previous info in mind:
1. The site is something you have to create out of the site design just manually from the Admin Center, the SPO Landing page or automatically by means of PowerShell
2. You can include a document library in your site design, so when it gets applied to your site the document library is created. However, you cannot create a document library with a folders structure by using a Site Design unless something else do it for you, such as Flow that is triggered when the Site Design is applied
3. You cannot set retention policies with Site Designs
4. You can add owners and members with a Site Design

Looking at your requirements, I would advise to take a look at PnP templates as an alternative to Site Designs

Hi @Juan Carlos González Martín Thanks for your response .

 

1. I know how to trigger flow from site design but do you know how to trigger flow after site deign is applied, This is to set retention policy and create folders under document library.

 

and regarding PnP provisioning , i am confused between below 2 articles . if you could clarify, it would be really helpful for me 

 

https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-pnp-provisioni... -->This require azure services license  to create azure function.

https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/introducing-the-pnp-provisioning-e...  

 

 

Glad to help!
I don't think you can trigger a Flow when a site design is applied, but what about running the Flow on a schedule and check if the site design has been applied. In regards of PnP Provisioning, you are correct on requiring an Azure subscription if you want to automate the provisioning using an Azure Function or Azure Automate