3 – Webparts Not Displaying

Overview

When you go to edit a SharePoint site sometimes you will find that the script editor as well as DynamicPoint web parts don’t display in the list of available webparts. This is because custom scripts are disabled in SharePoint Online modern sites. To enable then, you have to execute a simple PowerShell script.

Steps

  1. Open SharePoint Online Management Shell
  2. Connect to SharePoint Online tenant admin portal
    Connect-SPOService -URL https://<yourtenant>-admin.sharepoint.com
  3. Enable Custom Scripting by running the following
    Set-SPOSite $SiteURL https://<yourtenant>.sharepoint.com/sites/<yoursite> -DenyAddAndCustomizePages 0
  4. Refresh the page by navigating to the page and reload the page with an added query string added to the URL
    ?sw=bypass
  5. Edit the page and the web parts should now display
  6. If the web parts are still not there, delete the app from the site. Remove it from both recycle bins and re-add it. Be sure to use the ?sw=bypass as well.