Note: The steps described in this article only apply to Classic SharePoint sites and/or pages. BindTuning's Modern solutions do not require the activation of the Solutions option.
By default, for personal sites and self-service created sites in SharePoint Online, the option for Custom Script is disabled. To make the Solution option under Web Designer Galleries available in your Classic SharePoint Online environment, follow the steps below:
Prerequisite: To perform these steps, you must be logged in as a Global Administrator or SharePoint Administrator in your organization. If you don't see the "Admin" tile, you do not have the necessary permissions.
Log in to Microosft 365 as a global admin or SharePoint admin.
Click the app launcher icon (often called the "waffle" icon) in the upper-left corner and select Admin to open the Microsoft 365 admin center.
On the left pane, select Show All followed by SharePoint.
Select Settings.
If the SharePoint admin center opens in the modern interface, click "Go to the classic settings page".
Under the Custom Script section, select:
Allow users to run custom script on personal sites
Allow users to run custom script on self-service created sites
Click OK to save your changes.
Important: It can take up to 24 hours for these changes to take full effect across your SharePoint Online environment.
Enable Custom Script immediately via PowerShell
To allow custom script on a particular site collection immediately, you can use a PowerShell script through the SharePoint Online Management Shell. This method often bypasses the 24-hour waiting period for specific sites.
PowerShell to Enable Custom Script in a SharePoint Online Site Collection:
# Config Parameters - Update with your actual URLs
$AdminSiteURL = "https://contoso-admin.sharepoint.com" # Your SharePoint Admin Center URL (e.g., mycompany-admin.sharepoint.com)
$SiteURL = "https://contoso.sharepoint.com/sites/site1" # The URL of the specific site collection to update
# Get Credentials to connect
$Cred = Get-Credential
# Connect to SharePoint Online Tenant Admin
Connect-SPOService -URL $AdminSiteURL -Credential $Cred
# Disable DenyAddAndCustomizePages Flag (Enables Custom Script)
Set-SPOSite $SiteURL -DenyAddAndCustomizePages $False
Alternative: Using PnP PowerShell
You can also use PnP PowerShell, a popular community-driven set of cmdlets, to manage the DenyAddAndCustomizePages
flag.
# Site Variables - Update with your actual URLs $AdminSiteURL = "https://contoso-admin.sharepoint.com" # Your SharePoint Admin Center URL $SiteURL = "https://contoso.sharepoint.com/sites/site1" # The URL of the specific site collection to update #Connect to Admin Center Connect-PnPOnline -Url $AdminSiteURL -Interactive #Disable Deny Add-Customize Pages Set-PnPTenantSite -Identity $SiteURL -DenyAddAndCustomizePages:$False