How to Enable Saving Templates in SharePoint


Classic SharePoint Throwback


Earlier version of SharePoint like SharePoint On-Premise 2010, 2013, 2016, the classic versions, we are able to save list as template. By saving the list / site as template it is a very easy to create a clone of a list or a site. By having a template, we don’t need to create all those large SharePoint lists with a lot of columns AGAIN from scratch, just create 1 list / site, save it as template then that template can be used anywhere.


Why or when do we need to create a duplicate of the list or site collection?


During our SharePoint journey, having a clone of the production site it a very safe way to do the testing. Its more than another site, but its your development site or development list where we do all the testing and mass workflow runs. Its a bad idea to run your messy test items inside production lists / site right?


Why does saving site as template not available in SharePoint modern?


There are 2 reasons why its not visible, 1 is because you have Publishing Features enabled in your site or your site collection doesn’t support custom scripting. In SharePoint online, saving anything as template is not an option anywhere in the site settings because by default custom scripting is disabled in the site collection.


How do to make Saving list / site as template visible?


As a global or SharePoint admin in Microsoft 365, you can allow custom script as a way of letting users change the look, feel, and behavior of sites and pages to meet organizational objectives or individual needs. If you allow custom script, all users who have “Add and Customize Pages” permission to a site or page can add any script they want. Before you enable it please read the Security considerations set by Microsoft.

Below are the steps on how to enable templating in SharePoint online.

Please note that you need to be a SharePoint admin in your tenant and an admin in your site collection in order for you to successfully run this PowerShell snippet.

Connect in your admin service in your PowerShell

Connect-SPOService -Url "https://yourcompanyhere-admin.sharepoint.com"

Enable custom scripting by entering the PowerShell snippet below

Set-SPOsite https://yourcompanyhere.sharepoint.com/sites/Community -DenyAddAndCustomizePages 0

Were using the Set-SPOSite module of SharePoint online PowerShell. By having its DenyAddAndCustomizePages parameter value to 0, means we set the site collection to Deny the denial of custom scripting and that includes templating. A popular object given by SharePoint was pageContext for custom scripting.

We can also use the Set-PnPSite of PnP PowerShell modules

Set-PnPSite https://yourcompanyhere.sharepoint.com/sites/Community -NoScriptSite $false

Now that’s another tip! Hope it helps somehow. Let me know if you have questions or just leave a comment if we missed something.

Happy SharePointing! #SharingIsCaring

Automation Check Current User Is External User CLI Content Type CopyExcelRecordToList DenyAddAndCustomizePages Design ExcelPowerAutomate Expand Flows Issues Javascript Limitation Limitations List Templates Metadata ModernScriptEditor Node NodeJs Node Versioning NVM O365 o365 Cli OneDrive People People Metadata Permission PnP Power Automate PowerShell Rest Endpoint Save as Template ScriptEditor Send an HTTP Request to SharePoint SharePoint SharePoint Architecture SharePoint Designs SharePointList SharePoint Modern SharePoint Online SPFX SPO Sync Versioning Workflows

Leave a Comment

Your email address will not be published. Required fields are marked *