Allow or disallow scripting in SharePoint Online
- Sign in to Office 365 as a global admin or SharePoint admin.
- Select the app launcher icon in the upper-left and choose Admin to open the Office 365 admin center. (If you don't see the Admin tile, you don't have Office 365 administrator permissions in your organization.)
- In the left pane, choose Admin centers > SharePoint.
- Select settings.
- Under Custom Script choose:
- Allow users to run custom script on personal sites.
- Allow users to run custom script on self-service created sites.