Custom Scripts are disabled on SharePoint online by default. if we need to add some custom scripts or need to access your SharePoint Online Site using SharePoint Designer you need to allow custom scripts.
When you are going SharePoint Admin center in Office 365 portal, you can find setting tab ,after click on that you can find custom script title. by default these features are disabled.
if you need to add custom scripts or SharePoint Designer Access to the SharePoint Online Site, you should allow these two.
you can allow custom scripts by two ways.
- Allow by using SharePoint Admin Center (Change using by above screen), but it takes up to 24 hours to allow custom scripts on SharePoint Online Site.
- Allow by using SharePoint Online Management Shell, its very simple you need to run some power shell scripts.
To Allow custom scripts by using SharePoint Online Management Shell, you have to follow below steps,
- Download & Install SharePoint Online Management Shell, Click Here to Download SharePoint Online Management Shell.
- Open SharePoint Online Management Shell.Connect SharePoint site by providing SharePoint Site Credentials, run below power shell script on SharePoint Online Management Shell.
Connect-SPOService -Url “Site Url” -credential “User Name”
Use SharePoint Admin Center Url for Connect SharePoint Online (eg. https://udara-admin.sharepoint.com).
- Allow custom scripts by using below power shell script, run this,use
Set-SPOsite “Site Url” -DenyAddAndCustomizePages 0
After successfully run above Scripts now you can add custom scripts on SharePoint Online Site.