Microsoft 365 – Major Update – Removal of Custom Script setting in OneDrive and SharePoint web

Microsoft 365 - DelayDenyAddAndCustomizePagesEnforcement PowerShell CMDLET
Microsoft 365 - DelayDenyAddAndCustomizePagesEnforcement PowerShell CMDLET

Hi All,

Greetings for the day!!!

Today one of the very important update regarding Custom Script setting in SharePoint web and OneDrive

Major Update – “Removal of Custom Script setting in OneDrive and SharePoint web”

Background :

  • Currently there is an option to admin for allowing execution of custom scripts on either personal sites and self-service created sites
  • If we navigate to “SharePoint admin center” and then classic settings page (_layouts/15/online/TenantSettings.aspx ) we have this setting available
Microsoft 365 - SharePoint admin center - Custom Script setting
fig : Microsoft 365 – SharePoint admin center – Custom Script setting

MAJOR UPDATE – Details

  • In March 2024, there will change in above custom script settings
  • The above settings will be removed in March 2024
  • There will be exception through which we can delay this change till May 2024. New PowerShell command introduced – “DelayDenyAddAndCustomizePagesEnforcement

DelayDenyAddAndCustomizePagesEnforcement – PowerShell CMDLET

  • This new “DelayDenyAddAndCustomizePagesEnforcement” PowerShell CMDLET available in SharePoint Online Management Shell version 16.0.24524.12000
  • Options
    • False – Default option. or 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. When the value is set to true, a banner shows in the active sites list of the SharePoint admin center informing that changes to custom scripts are permanent.
Microsoft 365 - DelayDenyAddAndCustomizePagesEnforcement PowerShell CMDLET
fig : Microsoft 365 – DelayDenyAddAndCustomizePagesEnforcement PowerShell CMDLET
  • Currently while executing this PowerShell CMDLET will get above error as this CMDLET will be available from March 2024 and accessible till May 2024
  • This CMDLET will be available till May 2024

Important Points:

  • No extensions will be granted beyond the mentioned period.
  • As after May 2024, “DelayDenyAddAndCustomizePagesEnforcement” PowerShell CMDLET will not be available, and if we want to use feature which requires enable of custom scripting, SharePoint administrator need to rerun CMDLET to enable custom scripting at every 24 hours
  • The NoScriptSite setting will be configured to True for all existing SharePoint sites and OneDrive sites except for below mentioned sites 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
  • The execution of existing scripts in OneDrive and SharePoint sites will remain unaffected
  • There will not be an option to enable custom script on OneDrive sites once the delay set using DelayDenyAddAndCustomizePagesEnforcement ends in May 2024
  • 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.
  • 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 May 2024. After May, the 24 hour reversion will occur regardless of this setting. 

REFERENCES

Thanks for reading ! Stay tuned for more articles on Microsoft 365 Updates!

Prasham Sabadra

LIFE IS VERY BEAUTIFUL :) ENJOY THE WHOLE JOURNEY :) Founder of Knowledge Junction and live-beautiful-life.com, Author, Learner, Passionate Techie, avid reader. Certified Professional Workshop Facilitator / Public Speaker. Scrum Foundation Professional certificated. Motivational, Behavioral , Technical speaker. Speaks in various events including SharePoint Saturdays, Boot camps, Collages / Schools, local chapter. Can reach me for Microsoft 365, Azure, DevOps, SharePoint, Teams, Power Platform, JavaScript.

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Microsoft 365

Subscribe now to keep reading and get access to the full archive.

Continue reading