Permission & Access Issues

Fix SharePoint Access Denied When Creating a Web Part Page

Jason MillerJason Miller Nov 20, 2026 869 views

Question details

A site collection administrator needs to create a SharePoint Web Part Page containing a status list but receives an Access Denied message.

Product
SharePoint in Microsoft 365
Device & OS
not provided
Scenario
Creating a classic Web Part Page or Report in a SharePoint site or Reports library.
Observed behavior
SharePoint reports Access Denied even though the administrator has Full Control and publishing features are enabled.
Before you start

Identify the affected site URL and the library where you are creating the page. Ask a SharePoint administrator to check custom script settings, since site collection Full Control alone may not override tenant restrictions.

Solution 1Recommended

Check and allow custom script for the affected SharePoint site

Use this approach when a custom script restriction prevents an authorized user from creating a classic Web Part Page.

Allowing custom script can increase security risk. A SharePoint administrator should confirm that it is required and permitted by the organization before changing the setting.

1
Connect to SharePoint Online

In SharePoint Online Management Shell, run Connect-SPOService -Url https://contoso-admin.sharepoint.com, replacing the URL with your organization's SharePoint admin center URL. Sign in with an account authorized to administer SharePoint.

2
Check the site setting

Run Get-SPOSite -Identity https://contoso.sharepoint.com/sites/SiteName | Select-Object Url,DenyAddAndCustomizePages, replacing the URL with the affected site URL. A disabled custom script setting may block the page creation.

3
Allow custom script if approved

Run Set-SPOSite -Identity https://contoso.sharepoint.com/sites/SiteName -DenyAddAndCustomizePages 0 using the affected site URL. Apply this only if your organization's security policy permits it.

4
Test page creation

Return to the affected library and select New > Web Part Page or Report, if available. Try adding the status list again; setting changes may take time to propagate.

Check and allow custom script for the affected SharePoint site
Check the setting again if needed: Depending on your tenant's configuration, SharePoint may automatically reapply the custom script restriction within 24 hours. Some setting changes can also take up to 24 hours to take effect.
Free Microsoft Office alternative

Work with Office documents in WPS Office

WPS Office is a free, lightweight alternative for everyday document, spreadsheet, and presentation work. Its familiar interface and Office format compatibility make it easy to move existing files, although it cannot change SharePoint permissions or create SharePoint Web Part Pages.

Free, lightweight tools for common office workCompatibility with Microsoft Word, Excel, and PowerPoint formatsFamiliar interface for editing existing Office filesWork with documents downloaded from SharePoint independently of the Web Part Page issue
microsoft office alternative - wps office

Frequently Asked Questions

Why do I get Access Denied when I have Full Control?

A tenant or site custom script restriction can block classic page creation even for a site collection administrator. Ask a SharePoint administrator to check the site's DenyAddAndCustomizePages setting.

Does enabling publishing features also enable custom script?

No. Publishing features and custom script restrictions are separate settings. A SharePoint administrator can check custom script with Get-SPOSite in SharePoint Online Management Shell.

How long should I wait after allowing custom script?

Changes may take time to propagate and can take up to 24 hours. Also check whether your tenant automatically reapplies the restriction within 24 hours.

What if Web Part Page does not appear under New?

Check that you are in the intended library and that the site and library support the classic page type. Also review Settings > Library settings > Permissions for this document library.