SharePoint Online: Access Denied Error on Navigation Settings

Problem: When trying to change the navigation settings of a SharePoint Online site, I got an access denied error. Access Required: Sorry, you don’t have access.

sharepoint online navigation settings access denied

I’m sure, I am a Global Admin in Office 365 and Site Collection Administrator for that particular site collection. I tried the PowerShell way and got a similar error: “Access denied. You do not have permission to perform this action or access this resource.

The solution to the Navigation Settings Access Denied Error:

To fix this issue: You have to set the “Custom Script” setting to “Allow users to run custom script on self-service created sites” in the SharePoint Online Admin Center Settings page, and it takes 24 hours or so to propagate! So, let’s not wait and enable custom script at the site collection level.

PowerShell to Enable Custom Scripts in SharePoint Online Site Collection:

Enable the Custom scripts in the SharePoint Online site to resolve the error!

#Config Parameters
#Get Credentials to connect
$Cred = Get-Credential
#Connect to SharePoint Online Tenant Admin
Connect-SPOService -URL $AdminSiteURL -Credential $Cred
#Disable DenyAddAndCustomizePages Flag
Set-SPOSite $SiteURL -DenyAddAndCustomizePages $False

Here is another post on enabling custom script in SharePoint Online: How to Enable Custom Script in SharePoint Online?

Salaudeen Rajack

Salaudeen Rajack - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

Leave a Reply

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