Permission denied for "Add and Customize Pages" in Sharepoint Online


I have created root site in SharePoint Online, weird problem I started facing is being a site administrator I was not able to customize the page/ upload the any page or master page.

As in image below, for some reason I am set as Deny to "Add and Customize Pages".

The problem is related to 'Scripting Capabilities' being turned off by default for the root site collection in Office 365.

I found some article on community:

It mentions that turning on scripting through the Sharepoint Admin Settings and wait around 24 hours. However, this did not work for me. still the issue was there.

Following lines of script did a trick.


Connect-SPOService -Url https://<yoursitename> -credential <admincredentials>

Set-SPOsite https://<your root site url> -DenyAddAndCustomizePages 0

And it immediately started working!

Happy Learning!


  1. Thank you Anuj this helped me fix the issue.

  2. Huzzah! Although 4 years old, this was the only thing that worked. I too experienced the issue where the custom script enabling did not work but this worked immediately as stated! Many hours of searching - final the answer! Thank You!


Post a Comment

Popular posts from this blog

Search Query by ContentType name issue

Search Result Webpart,Filter result If QueryString is present in URL

SharePoint 2013 List CRUD operation using Angular and REST API