SharePoint Online is transitioning from a 'Classic Experience', which looks very much like legacy versions of SharePoint, to a 'Modern Experience' that looks more attractive and behaves in a way that people expect from modern websites.
As part of this transition Microsoft is making many changes to the way SharePoint works. One of these changes is that custom scripts are disabled by default in the Modern Experience. Disabling custom scripts has some undesirable side effects including disabling of the Solution Gallery, which is used to deploy our SharePoint Designer workflow actions.
When Custom Scripts are disabled, please follow the instructions below to enable them again:
- Download and install the SharePoint Online Management Shell.
- Launch the newly installed SharePoint Online Management Shell.
- Connect to SharePoint Online as a global admin of SharePoint admin using the following command:
Connect-SPOService -Url https://[yourtenant]-admin.sharepoint.com
- Enable custom scripts using the following command:
Set-SPOSite -Identity https://[yourtenant].sharepoint.com/[siteurl] -DenyAddAndCustomizePages 0
That is it.
For more details about Custom Scripts, see this article on the Microsoft website.