Imaginet Blog

Custom Script Setting in SharePoint & OneDrive Removed

Blog

Janine Jeanson
2024-08-22

Custom Script Setting in SharePoint & OneDrive Removed

Custom Script Setting in SharePoint & OneDrive Removed  

August 22, 2024

Last week, we published a blog discussing Microsoft retiring SharePoint Add-Ins. In that blog, we briefly discussed how the Classic Mode for Custom Scripts has been affected by that change. The Custom Script setting in SharePoint and OneDrive has already been removed – the change took place in May 2024.  

There is a new PowerShell command (DelayDenyAddAndCustomizePagesEnforcement) that will allow administrators to delay any changes until November of this year. Additionally, the NoScriptSite setting will be configured to True for all existing sites except for specific site templates.  

How Will The Removal of Custom Script Settings Affect My Organization? 

Because the Custom Script setting has been removed, you can’t add, modify, or remove scripts within OneDrive and SharePoint sites unless administrators allow it by turning on the PowerShell command DelayDenyAddAndCustomizePagesEnforcement. Existing scripts in OneDrive and SharePoint sites will not be affected.  

What Do I Do About the Custom Script Setting Being Removed? 

If you’re reading this, we hope you have managed to issue the PowerShell command to delay changes. Many Microsoft users have been left confused by these updates.  

It is important to make necessary updates to your training materials and documents as no extensions will be granted beyond November. The last thing you want to do is leave this until the last minute.  

Review the following for additional information: Allow or prevent custom script 

Exactly What Changes Will Be Made? 

  1. The Custom Script setting, which determines if users can execute custom scripts on personal sites and self-service created sites will be removed by early-May (Previously March). 

    This setting is currently located in the SharePoint Admin Center, under Settings -> Classic Settings. 
Custom Script Setting
  1. A new PowerShell command, “DelayDenyAddAndCustomizePagesEnforcement”, has been introduced. This command is available in the SharePoint Online Management Shell version 16.0.24524.12000, or above which allows delay of the change to custom script set on the Tenant until mid-November 2024 (previously May). 
     
    While this cmdlet is available in the latest management shell, running the cmdlet will result in an error (The requested operation is part of an experimental feature that is not supported in the current environment) until Mid-April 2024 (Previously March) when the settings are shipped. 
     
    * False (default) – for site collections where administrators enabled the ability to add custom script, SharePoint will revoke that ability within 24 hours from the last time this setting was changed. 
    * True – All changes performed by administrators to custom script settings are preserved. 
     
    Set-SPOTenant -DelayDenyAddAndCustomizePagesEnforcement $True 
    Please be aware that the new PowerShell command will only be accessible until mid-November 2024 (previously May). Post that period, on SharePoint sites if administrators wish to continue using features that are only available when unmanaged custom scripts are permitted to run, they will need to re-enable the running of custom scripts every 24 hours. This option does not impact existing custom scripts. 
  1. The NoScriptSite setting will be configured to True for all existing SharePoint sites and OneDrive sites except for below-mentioned site templates. 
     
    BLANKINTERNETCONTAINER#0 = Classic Publishing Portal site 
    CMSPUBLISHING#0 = Publishing Site 
    BLANKINTERNET#0 = Publishing Site 
    GROUP#0 = Team site 
    APPCATALOG#0 = App Catalog 
    CSPCONTAINER#0 = CSP Container 
  1. There will not be an option to enable custom script on OneDrive sites once the delay set using DelayDenyAddAndCustomizePagesEnforcement ends in mid-November 2024 (previously May). 
  1. Customers will retain the ability to permit the execution of custom scripts on specific SharePoint sites using the Set-SPOSite <SiteURL> -DenyAddAndCustomizePages PowerShell command or from the Active sites page in the SharePoint Admin Center.
Custom Script Setting

Any modifications made to a site will be automatically reverted to False status within 24 hours, unless the new PowerShell command “DelayDenyAddAndCustomizePagesEnforcement” is used prior to mid-November 2024 (previously May). After mid-November, the 24-hour reversion will occur regardless of this setting.  

No longer being able to allow custom script on OneDrive sites left many Microsoft users scrambling. We hope you were able to flag this change and make changes accordingly. If you are struggling with these changes and need guidance, fill out the form below. Someone from our team will be in touch.  

Thanks for reading! Make sure to subscribe to our blog. We publish Microsoft updates or technology tips and tricks every week.

    Want to hear the latest from out team of experts? Sign up to receive the latest news right to your inbox. You may unsubscribe at anytime.

    Teams Premium

    Discover More

    Power Automate Desktop

    Power Automate Desktop: Best Practices & More 

    Janine JeansonOct 10, 20244 min read

    Power Automate Desktop: Best Practices & More  October 10, 2024 Power Automate Desktop: Best Practices & More  Recently, we attended the Power Platform Community Conference, where we were able to…

    Power Apps vs Traditional Coding

    Power Apps vs Traditional Coding: Which is Right for You?

    Stephan AlexanderOct 3, 20245 min read

    Power Apps vs Traditional Coding: Which is Right for You? October 3, 2024 Power Apps vs Traditional Coding: Which is Right for You? The surge in demand for digital services…

    Custom Applications

    Custom Applications: Choosing the Right Company for Your Needs 

    Janine JeansonSep 26, 20245 min read

    Custom Applications: Choosing the Right Company for Your Needs  September 26, 2024 Custom Applications: Choosing the Right Company for Your Needs  Today, many organizations are turning towards custom applications to…

    Let’s build something amazing together

    From concept to handoff, we’d love to learn more about what you are working on.
    Send us a message below or call us at 1-800-989-6022.