Fix “You do not have permission to open this website in SharePoint Designer” Error

Problem: When trying to open a SharePoint Online site in SharePoint Designer, I got this error message, “You do not have permission to open this website in SharePoint Designer”

You do not have permission to open this web site in sharepoint designer

Solution:

By default, SharePoint designer customizations are disabled in modern group sites in SharePoint Online. To enable SharePoint designer, You have to set the “DenyAddAndCustomizePages” flag to False.

PnP PowerShell to Fix “You do not have permission to open this web site in SharePoint Designer”

We can also use PnP PowerShell to enable custom scripting for the SharePoint Online site.

#Parameters
$TenantAdminURL = "https://crescent-admin.sharepoint.com"
$SiteURL = "https://crescent.sharepoint.com/sites/Sales"

#Connect to Tenant Admin
Connect-PnPOnline $TenantAdminURL -Interactive
 
#Enable Custom Script for the Tenant Site
Set-PnPTenantSite -Url $SiteURL -DenyAddAndCustomizePages:$false

This also enables custom scripting for the given SharePoint Online site.

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. Passionate about sharing the deep technical knowledge and experience to help others, through the real-world articles!

Leave a Reply

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