Fix SharePoint Online Administrator Access Denied Errors
Question details
Resolve access-denied errors when administrators change SharePoint Online navigation or site settings.

- Product
- Microsoft SharePoint Online
- Device & OS
- not provided
- Scenario
- A Global Administrator or site collection administrator needs to update a SharePoint site's navigation or settings.
- Observed behavior
- The administrator receives an access-denied error or an access request when attempting to make changes.
Identify the affected site URL, account, and setting that produces the error. Sign in with an account that can access the SharePoint admin center and check whether your organization permits custom script on the site.
Check custom script restrictions on the affected site
Use this approach when the blocked navigation or settings change requires custom script capabilities.
Custom script restrictions can block actions that require the Add and Customize Pages permission, even for administrators. Enable custom script only when it is necessary and permitted by your organization's security policy.
In the SharePoint admin center, go to Sites > Active sites and select the affected site.
Open the site's Settings tab and look for Custom script. If the option is available and policy permits it, allow custom script for the site and save the change.
If the setting is unavailable in the admin center, connect with the SharePoint Online Management Shell using Connect-SPOService and your tenant's admin URL. Then run Set-SPOSite -Identity <site-url> -DenyAddAndCustomizePages 0 for the affected site.
Return to the site's navigation or settings page and retry the action. If your tenant uses older custom script settings for self-service-created or personal sites, changes to those settings can take up to 24 hours to apply.

Verify site administrator access
Check the affected account's site access before assuming a Global Administrator role grants access to every site.
Assign a custom permission level for page customization
Use a custom permission level when a user needs Add and Customize Pages but should not receive full site administrator access.
Work with Office Documents in WPS Office
WPS Office is a free, lightweight alternative for editing documents, spreadsheets, and presentations. Its familiar interface and Microsoft Office format compatibility help you move between suites, although it does not change SharePoint permissions.

Frequently Asked Questions
Why can a Global Administrator receive access denied on a SharePoint site?
The Global Administrator role does not automatically grant access to every site's content. Check the account under SharePoint admin center > Sites > Active sites > the affected site > Permissions, and review site-level restrictions.
Can a site collection administrator be blocked by custom script restrictions?
Yes. Actions that require Add and Customize Pages can be blocked by a site's custom script restriction, even for an administrator. Check the site's custom script setting in the SharePoint admin center or with SharePoint Online PowerShell.
How long does a custom script setting take to apply?
Older tenant settings for self-service-created and personal sites can take up to 24 hours to apply. Site-level custom script permissions may also be automatically restricted again after 24 hours.
Where can I add the Add and Customize Pages permission?
On the site, open Settings > Site permissions > Advanced permissions settings > Permission Levels. Create a permission level containing Add and Customize Pages, then assign it through Grant Permissions if organizational restrictions allow it.
Does WPS Office fix SharePoint Online access-denied errors?
No. SharePoint access and custom script settings must be managed in Microsoft 365 or SharePoint. WPS Office can edit compatible Office files but cannot change SharePoint site permissions.




