← Back
(Updated) Updates to custom scripting in sites and Classic Publishing site creation
MC1117115 · build prod-20251231-200323
Category
planForChange
Severity
normal
Major change
True
Last modified
2026-01-29 17:41:22
Summary source
Azure OpenAI (gpt-4.1)
Action by (Graph)
Action by (AI)
Services
SharePoint Online
Tags
Updated message, Feature update, Admin impact
Master tags
Admin, Security
Roadmap IDs

One-line summary

Starting September 15, 2025, custom scripting and new classic publishing sites will be restricted in SharePoint Online; key PowerShell opt-out retires March 15, 2026.

Similar updates

More like this
MC1186368 Microsoft SharePoint: Update to custom scripting governance in App Catalog site
Microsoft SharePoint: Update to custom scripting governance in App Catalog site Custom scripting will be disabled by default on SharePoint Online App Catalog sites starting mid-January 2026 to enhance security; app operations remain unaffected. To strengthen security and reduce the risk of ungoverned scripting, Microsoft is expanding the custom.
MC1133898 PowerShell 2.0 removal in Windows
PowerShell 2.0 removal in Windows Windows PowerShell 2.0 will be removed from Windows 11 (24H2) in August 2025 and Windows Server 2025 in September 2025; update legacy scripts to newer PowerShell versions. Windows PowerShell 2.0 is removed from Windows 11, version 24H2 starting with the August 2025 non-security update. PowerShell 5.x introduced.
MC1193419 (Updated) Content Security Policies (CSP) are coming to SharePoint Online and might impact your custom SPFx solutions
(Updated) Content Security Policies (CSP) are coming to SharePoint Online and might impact your custom SPFx solutions SharePoint Online will enforce Content Security Policy from March 1, 2026, blocking scripts from non-trusted sources and requiring remediation for non-compliant SPFx solutions. Updated March 13, 2026: We have updated the timeline..
MC1186372 (Updated) SharePoint branding governance via PowerShell
(Updated) SharePoint branding governance via PowerShell SharePoint admins can centrally enforce branding and themes using PowerShell, audit changes, disable site-level branding, and manage themes across geos to ensure brand consistency. Updated February 25, 2026: We have updated the timeline. [Introduction] Coming soon to SharePoint: Tenant.
MC1184996 (Updated) Legacy SharePoint Online Content Delivery Network (CDN) domain to be retired—review configurations
Updated January 8, 2026: We have updated ... Thank you for your patience. [Introduction] As part of ongoing service modernization, Microsoft has migrated the hosting of SharePoint Online static assets to the Microsoft Azure Front Door (AFD) content delivery network (CDN), using the new domain public-cdn.sharepointonline.com. This migration was.
MC693865 (Updated) SharePoint Add-In retirement in Microsoft 365
(Updated) SharePoint Add-In retirement in Microsoft 365 SharePoint Add-Ins will retire and stop working after April 2, 2026; admins must migrate to SharePoint Framework (SPFx) as Add-Ins will become unusable. Updated March 2, 2026: This update serves as a f... Since the release of SharePoint Add-Ins in 2013, Microsoft has evolved SharePoint.

Details

Summary
Starting September 15, 2025, SharePoint Online will disable custom scripting by default on classic publishing sites, block creation of new classic publishing sites, and prevent publishing feature activation. New settings allow site property bag updates without enabling custom scripting. Temporary opt-outs via PowerShell are available until March 15, 2026.

Body (from Message Center)

Updated January 29, 2026: We are updating this post as a reminder. Upcoming SharePoint Online changes may impact your organization. Please review the below.

We are implementing the following changes to custom scripting and classic publishing in SharePoint Online.

1. Disablement of custom scripting

Custom scripting will be disabled by default (setting DenyAddAndCustomizePages to 1 or $true) for sites created with the following templates:

  • BLANKINTERNETCONTAINER#0 = Classic Publishing Portal Site
  • CMSPUBLISHING#0 = Classic Publishing Site
  • BLANKINTERNET#0 = Classic Publishing Site Blank
  • CSPCONTAINER#0 = SharePoint Embedded Site

NOTE:

  • Existing classic publishing sites created with the templates listed above will have custom scripting disabled by default.
  • Disabling custom scripting does not affect the execution of scripts that have already been added to a site or page.

Refer to this documentation to learn more about the security considerations of ungoverned scripting.

2. Ability to set site property bag valued without requiring custom scripting enablement.

Users no longer need to set DenyAddAndCustomizePages to $false or 0 (i.e. enable custom scripting) in a site to manage site property bag values. We have introduced a new AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled setting at the site level and at the tenant level to allow adding/managing site property bag values. Please see documentation here for tenant level setting and here for the site level setting. 

3. Classic publishing sites creation and feature activation changes

Users will no longer be able to create new classic publishing related site collections or activate publishing features in existing site collections. This applies to both UX and API interactions.

Sites collections with the following templates cannot be created:

  • BLANKINTERNETCONTAINER#0 = Publishing Portal Site
  • CMSPUBLISHING#0 = Publishing Site
  • BLANKINTERNET#0 = Publishing Site Blank
  • ENTERWIKI#0 = Enterprise Wiki
  • SRCHCEN#0 = Enterprise Search Center
  • SPSSITES#0 = Site Directory
  • SPSNHOME#0 = News Home Site
  • PRODUCTCATALOG#0 = Product Catalog
  • SPSREPORTCENTER#0 = Report Center
  • SPSTOPIC#0 = Topic Area Template

Existing classic publishing enabled site collections are unaffected and can continue regular usage, including creation of sub sites.

[When this will happen]

Both changes, the extended custom scripting governance and the new classic publishing restrictions, will take effect starting September 15, 2025.

[How this will affect your organization]

  • When custom scripting is disabled in classic publishing sites, users will no longer be able to use script editor web parts, create custom master pages or page layouts, and utilize several other features. More details on features affected when custom scripting is disabled can be viewed in this documentation.

  • With the change to stop the creation of new classic publishing site collections and publishing feature activation, SharePoint admins will no longer be able to create new classic publishing enabled site collections or enable publishing features at site collection level.

[What you need to do to prepare]

We recommend taking the following actions to prepare for these upcoming changes.

1. Inform owners of the classic publishing sites in your organization of these upcoming changes. Promote switching to use of Modern sites. Refer to this guide.

2. The following tenant-level opt-out operation, used to allow custom scripting changes in classic publishing sites, will be retired starting March 15, 2026. Please ensure appropriate actions are taken ahead of this change.

Set-SPOTenant -DelayDenyAddAndCustomizePagesEnforcementOnClassicPublishingSites $true

3. Customers may still temporarily opt out of custom scripting enforcement for a specific site (any template) with tenant admin approval. This opt-out is effective for 24 hours and can be enabled using the following PowerShell command:

Set-SPOSite <SiteURL> -DenyAddAndCustomizePages $false

4. If you need to allow the creation of new classic publishing site collections or enable publishing feature activations, use the following PowerShell command set the flag to allow.

Set-SPOTenant -AllowClassicPublishingSiteCreation $true

NOTE:

  • You need to install the latest (16.0.26211.12010 or higher) SharePoint Online Management Shell in order to run the commands above.
  • The DelayDenyAddAndCustomizePagesEnforcementOnClassicPublishingSites command is scheduled to end starting on March 15, 2026, while all other commands are expected to remain functional beyond that date. 

[Compliance considerations]

There is no impact or change to compliance.

[Referenced content]

Security considerations of allowing custom script - SharePoint in Microsoft 365 | Microsoft Learn

Allow or prevent custom script - SharePoint in Microsoft 365 | Microsoft Learn

SharePoint modernization guidance | Microsoft Learn


Raw JSON (for debugging)

Expand/collapse the full payload below.
Show/hide raw
{
  "snapshot_item": {
    "action_required_by": null,
    "ai_action_required_by": null,
    "ai_actions": [
      "Notify classic publishing site owners",
      "Promote migration to Modern sites",
      "Review use of custom scripting and classic publishing",
      "Review and update PowerShell scripts as needed",
      "Install updated SharePoint Online Management Shell"
    ],
    "ai_master_tags": [
      "Admin",
      "Security"
    ],
    "ai_model": "gpt-4.1",
    "ai_summary": "Starting September 15, 2025, custom scripting and new classic publishing sites will be restricted in SharePoint Online; key PowerShell opt-out retires March 15, 2026.",
    "ai_topics": [
      "SharePoint"
    ],
    "category": "planForChange",
    "details_map": {
      "Summary": "Starting September 15, 2025, SharePoint Online will disable custom scripting by default on classic publishing sites, block creation of new classic publishing sites, and prevent publishing feature activation. New settings allow site property bag updates without enabling custom scripting. Temporary opt-outs via PowerShell are available until March 15, 2026."
    },
    "id": "MC1117115",
    "importance": 4,
    "is_major_change": true,
    "last_modified": "2026-01-29T17:41:22Z",
    "ms_products": [
      "SharePoint"
    ],
    "platforms": null,
    "roadmap_ids": [],
    "services": [
      "SharePoint Online"
    ],
    "severity": "normal",
    "tags": [
      "Updated message",
      "Feature update",
      "Admin impact"
    ],
    "title": "(Updated) Updates to custom scripting in sites and Classic Publishing site creation"
  }
}