Requirement: Enable SharePoint Designer for a SharePoint Online site.
SharePoint Online: How to Enable SharePoint Designer?
By default, SharePoint designer customizations are disabled for modern group sites in SharePoint Online. It gives an error message “The server could not complete your request.” when you try to open a SharePoint Online group site in SharePoint Designer.
Also, It gives “You do not have permission to open this web site in SharePoint Designer” error message:
How to Enable SharePoint Designer in SharePoint Online?
To enable SharePoint Designer, follow these steps:
- Sign in to Office 365 and go to the SharePoint Online Admin Center.
- Click on Settings from the left navigation >> Scroll down to the “Custom Script” section
- Under the 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.
This enables SharePoint Designer in SharePoint Online. However, this change may take up to 24 hours to reflect. To enable SharePoint Designer on a particular site collection immediately, use this PowerShell script through SharePoint Online Management Shell. Also, when you enable custom scripting through the web interface, you enable it for all sites in the tenant. However, you can enable or disable custom scripting on a specific site collection through PowerShell.
PowerShell to Enable SharePoint Designer:
If you want to enable SharePoint designer, use this PowerShell script:
#Set Parameters $AdminSiteURL="https://Crescent-Admin.sharepoint.com" $SiteURL="https://crescent.sharepoint.com/sites/creditpipeline" #Connect to SharePoint Online Admin Center Connect-SPOService -Url $AdminSiteURL -Credential (Get-Credential) #Enable SharePoint Designer for the site collection Set-SPOSite -Identity $SiteURL -DenyAddAndCustomizePages $False
To Disable SharePoint Designer customization for a SharePoint Online site collection, use:
#DisableSharePoint Designer for the site collection Set-SPOSite -Identity $SiteURL -DenyAddAndCustomizePages $True
You can enable custom script with PnP PowerShell as well: How to Enable Custom Script in SharePoint Online using PowerShell?