Fix "Sorry, You don't have access" Access Denied Error on Save Site as Template in SharePoint Online
Problem: Getting "Sorry, You don't have access" access denied error when trying to save site as template in SharePoint Online site from URL: https://crescent.sharepoint.com/_layouts/15/savetmpl.aspx
Solution: To fix this problem, we need to enable custom scripts. Here is how to fix the access denied error on Save Site as Template.
PowerShell to Fix SharePoint Online Save Site as Template Access Denied Error:
Use this PowerShell script to immediately fix the access denied error on save site as template.
Solution: To fix this problem, we need to enable custom scripts. Here is how to fix the access denied error on Save Site as Template.
- Login to SharePoint Online Admin Center
- Click on Settings from the left navigation >> Scroll down to "Custom Script" section
- Set "Allow users to run custom script on personal site" and "Allow users to run custom script on self-service created sites" options.
- Click on "OK" to save your changes.
PowerShell to Fix SharePoint Online Save Site as Template Access Denied Error:
Use this PowerShell script to immediately fix the access denied error on save site as template.
#Config Parameters $AdminSiteURL="https://crescent-admin.sharepoint.com" $SiteURL="https://crescent.sharepoint.com" #Get Credentials to connect $Cred = Get-Credential #Connect to SharePoint Online Tenant Admin Connect-SPOService -URL $AdminSiteURL -Credential $Cred #Disable DenyAddAndCustomizePages Flag Set-SPOSite $SiteURL -DenyAddAndCustomizePages $FalsePlease note, the change by PowerShell script can be overridden in the next 24 hours, If the settings don't match! So make sure you have same settings (either disable or enable) both in PowerShell and in SharePoint Online Admin center "Custom Script" settings.
No comments:
Please Login and comment to get your questions answered!