I am a SharePoint site admin with full control, but I am unable to upload files or create folders in the Style Library, even though I've allowed custom scripts from the central admin. The site level in question is: https://[site].sharepoint.com/sites/[site name].

I don't have any issues uploading files to the Style Library at the root site (https://[site].sharepoint.com). Any pointers would be much appreciated.Thanks.

2 Answers 2


The global setting which you have applied takes up to 24 hours to activate so, just wait for that.

But if there is an urgent need, then you can execute the below PowerShell scripts.

Connect-SPOService -url https://<tenantname>-admin.sharepoint.com
Set-SPOsite https://<siteurl> -DenyAddAndCustomizePages 0

Immediately, the effect will be reflected, but it is observed that it gets reset at some point. Thus, the best approach to update it in the Admin area and wait for a day (24 hours).

  • Thank you for your response Divya. I've ran the script in Pshell so hopefully, it sticks. Feb 3, 2021 at 0:57
  • Thank you, Monty. You can mark it as an answer if it helps you. Feb 3, 2021 at 6:06

If you have enabled custom script at tenant level, just run the commands provided in the other Answer (Set-SPOsite <SiteURL> -DenyAddAndCustomizePages 0) to enable it at site level.

A quick method to check if the custom script on site level is enable: Navigate to one of your lists and then switch it to classic experience, see if you can see some of the buttons grey out on list menu (“Edit List” with SharePoint Designer, for example). If yes, then custom script on site level is not enabled.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.