Connect to your SharePoint Admin center via Microsoft SharePoint Online PowerShell:


type your admin center URL: https://<yourdomain>

and login.

Run the command:

Set-SPOSite -Identity https://<Your site collection url> -DenyAddAndCustomizePages $false

Make sure the scripting setting in the admin portal matches what you set using PowerShell, or the site collection setting may be overridden again in the next 24 hours. You can find your settings by URL: