[Fixed] Script Editor web-part missing in SharePoint Online.

microsoft_logo script editor missing in sharepoint online
credit: Microsoft

Script editor web-part is used in SharePoint online to add custom HTML, JS elements in SharePoint pages. In general script editor web-part allows users to customize SharePoint sites. But however, in SharePoint online script editor web part is hidden by default and you need to run power shell command to enable it. As the script editor web-part is hidden, most users think that the feature is missing in SharePoint Online.

Do not worry, follow the below steps to enable/unhide the script editor web part for SharePoint online site.

newbietechie.com_script editor missing in SharePoint
Missing Script Editor

Reason behind missing web-part in SPO

Script editor is not always hidden, it depends on the site you are in or you have created. If you look/examine carefully you will see that Script editor web part is mostly missing for SharePoint “team sites” but available for communication sites and development sites. True, right?, but why? Well if you think from a users point of view. An user do not need the script editor web-part to create a custom add-in/web-part, It is the job of developers to create and test add-ins. That is why script editor web-parts are hidden/ missing by default in SharePoint online team sites.

Also another reason might be that Microsoft is trying to slowly remove custom JavaScript add-in capability from SharePoint online. The new method for developing SharePoint add-ins is by using SPfx web-parts. Spfx is more robust and secure and can be added to modern SharePoint pages as well, hence Microsoft is moving that way.

(This is my understanding, the actual reason may be different).

Enable The Script Editor Web-part for SPO – Quickly

To enable the script editor web-part for SharePoint Online site, follow the below steps. One Point to note, you need to be a SharePoint admin to enable it.
For the list of SharePoint PowerShell commands check this Microsoft documentation.

  1. Run PowerShell as an admin
newbietechie.com_run-powershell-as-admin
run PowerShell as admin
  1. Check if you have the SharePoint online PowerShell module. Run the following command, if you do not see any output then you do not have the PowerShell Module Installed. (To install the module, run the next command)
    Check Module: Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable | Select Name,Version
    Install Module (admin): Install-Module -Name Microsoft.Online.SharePoint.PowerShell
    Install Module(non-admin): Install-Module -Name Microsoft.Online.SharePoint.PowerShell -Scope CurrentUser
    As you can see in the following image, I have installed the module as I did not have it installed previously.
newbietechie.com_Install-SharePoint-Online-module-powershell
Install SharePoint Online Module for PowerShell
  1. Next connect to your SharePoint online tenant using the following command, (login if prompted)
    command(Change your site URL): Connect-SPOService -Url https://yourtenant-admin.sharepoint.com
    The command should execute without any errors. If you receive any errors, check if you have correct permissions(SharePoint Administrator Role).
newbietechieConnect-SPOService to enable script editor missing
  1. If the previous command was successful, run the following command to enable the script editor feature.
    This feature can be enabled only for a particular sub site as well.
    Command: Set-SPOSite <Your Site URL> -DenyAddAndCustomizePages 0
    The command should execute without any errors. If any errors check PowerShell version and if you have site collection admin access or not.
newbietechie denyaddcustpages for script editor missing
  1. If the command runs successfully, wait for 15-20 mins and check if the script editor is enabled. If the Script editor web part is still missing, the follow the previous steps again. If it is missing after following the steps again, then check your SharePoint tenant settings or contact Microsoft support.
    After successful execution, you should be able to see the web part as below.
script-editor-web-part- missing sharepoint
Script editor web part visible now

That’s all for this post. I hope now you understand why script editor web part is missing in SharePoint online and how to enable it. If you liked this post, please consider checking our other posts related to SharePoint Online troubleshooting and development using this link.

If you liked this post then please consider supporting us by buying something using the below links. Thank you.

Please Help us Grow!

I hope you have found this article helpful. If you are happy with the document, please use the below links when you buy something from Amazon to help us grow.

Ways to Help

Amazon Affiliate Links

How this works?

Amazon affiliate program gives a small (%)share of price to the referrers, so feel free to buy anything.
Below are some Amazon affiliate links, if you open amazon application/website using these links and buy something, (it can be one of the below items or anything of your choice) Then Amazon will give us a little percentage(%) of the money you spend on Amazon. To know more check this document.

$350-Best Student laptop
Amazon In, Amazon US

$600-Work laptop
Amazon In, Amazon US

$989– High performance
Amazon In, Amazon US

Headset – $15.99
Amazon In, Amazon US

Lightspeed Mouse – $39
Amazon In, Amazon US

Keyboard – $29
Amazon In, Amazon US

The Psychology of Money
Amazon In, Amazon

Atomic Habits:
Amazon In, Amazon

Find Balance and Purpose in Life
Amazon In, Amazon

$30, Smart Watch for Smart you
Amazon In, Amazon US, Amazon UK

Work comfortably with $110
Amazon In, Amazon US, Amazon UK

Exercise at home
Amazon In, Amazon US, Amazon UK

Thank you
For your Contribution

newbietechie.com
Author @ramizmollahmd

Leave a Comment