Site Templates in SPO

Copper Contributor

I understand that Site Templates are not available in SPO. Is there another solution that MS has for replacing this? Having a site template greatly reduces the amount of work for when we need to create multiple sites with the same libraries, lists, webparts on the landing pages etc. We are not comfortable with allowing scripts for security reason. Is there another way to streamline this process?

6 Replies

Take a look at the following: 

 

SharePoint site design and site script overview

https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-overview

 

Calling the PnP provisioning engine from a site script

https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-pnp-provisioni...

Johanson is correct, site templates actually exists in SPO, but you need at least at the beginning to have a developer to created your site templates...the old way to save a site as template is not available in modern SPO sites and in general you should avoid to use it

You could use the PnP provisioning template to export any site as a PnP template and create a new site using that. Follow below link to start with PnP.

https://github.com/SharePoint/PnP-Provisioning-Schema

Is allowing Site Scripts different than allowing end user scripts? Looking at this page https://support.office.com/en-us/article/allow-or-prevent-custom-script-1f2c515f-5d7e-448a-9fd7-835d..., we do not want to allow scripts because of the security concerns. Are these the same or are they different? Does the PnP solution have security implications?

Site Scripts/ Site Designs are controlled/deployed by the Administrator. Yes they are different then end user scripts. By default when you create a Modern Team Sites and Communication Site it is set to "NoScript". Custom Script setting is disabled by default for Office 365 Groups or Modern team sites. When site has scripting capabilities disabled, all scenarios where end user can inject script to be executed, and running on behalf of other users (not administrative approved) are disabled
 
Visit the following article to Allow or prevent custom script on SharePoint Sites. 
 

We are using PnP script created by Microsoft partner, works really well. There are some minor manual changes that we make following site creation to 'personalise' that site for specific business needs but on the whole it is saving over an hour of work per site. We also have the capability setup to create multiple sites using the script just by entering details into a CSV. The PnP runs off of an XML file. Different XMLs can be created and run for different templates.