Permission & Access Issues

Enable Add and Customize Pages on a Modern SharePoint Site

Elise WilliamsElise Williams Nov 14, 2026 869 views

Question details

Enable the Add and Customize Pages permission on a modern SharePoint site where an administrator is denied access.

Product
SharePoint Online
Device & OS
not provided
Scenario
A SharePoint administrator with Full Control needs to customize pages on a modern team site.
Observed behavior
The Add and Customize Pages permission is denied even after custom scripts are enabled in the SharePoint admin center.
Before you start

Confirm the URL of the affected site collection and have a SharePoint administrator account ready. Enabling custom scripts can increase security risks, so check your organization's policy before changing the setting.

Solution 1Recommended

Allow Custom Scripts for the SharePoint Site Collection

Use SharePoint Online PowerShell to change the site-level setting when the admin center setting has not cleared the permission denial.

The PowerShell command targets a site collection. If the affected page is in a subsite, identify its parent site collection before running the command.

1
Install the PowerShell module

Open PowerShell and run Install-Module -Name Microsoft.Online.SharePoint.PowerShell if the SharePoint Online Management Shell module is not installed.

2
Connect to SharePoint Online

Run Connect-SPOService -Url https://yourtenant-admin.sharepoint.com, replacing the URL with your tenant's SharePoint admin center URL, and sign in with an authorized administrator account.

3
Enable custom scripts

Run Set-SPOSite -Identity https://yourtenant.sharepoint.com/sites/yoursite -DenyAddAndCustomizePages 0, replacing the URL with the affected site collection URL.

4
Check the permission

Wait for the change to propagate, then return to the affected SharePoint site and retry the action that was denied. You can also check the setting with Get-SPOSite -Identity https://yourtenant.sharepoint.com/sites/yoursite | Select-Object DenyAddAndCustomizePages.

Allow Custom Scripts for the SharePoint Site Collection
The setting may be reset: SharePoint may automatically reset custom script settings to blocked. If the permission denial returns, check your tenant's custom script enforcement policy and Microsoft's current guidance.
Free Microsoft Office alternative

Work on Office Documents with WPS Office

WPS Office is a free, lightweight alternative for editing documents, spreadsheets, and presentations in a familiar interface. Its Microsoft Office format compatibility helps you move existing files into your workflow, though it cannot change SharePoint permissions or custom script settings.

Edit documents related to your SharePoint workflowOpen and edit Microsoft Office formats including DOCX, XLSX, and PPTXUse a familiar interface that makes migration easierAccess a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why is Add and Customize Pages denied when I have Full Control?

A site-level custom script restriction can block the permission even for a user with Full Control. Check the site collection's DenyAddAndCustomizePages setting with SharePoint Online PowerShell.

Which URL should I use with Set-SPOSite?

Use the affected site collection URL in the -Identity parameter. If the issue occurs in a subsite, identify its parent site collection rather than entering a page URL.

How can I verify that custom scripts are allowed?

After connecting with Connect-SPOService, run Get-SPOSite -Identity followed by the site collection URL and select DenyAddAndCustomizePages. A disabled setting indicates that custom scripts are allowed.

Why did the permission denial return later?

SharePoint may automatically reset the custom script setting to blocked. Recheck DenyAddAndCustomizePages and review your tenant's custom script enforcement policy.