MC1479517 says no admin action is required before rollout. I switched Allow HTML files off on a test site and then added and published an HTML page anyway, twice, as a normal member.
Key takeaways
- There is no tenant switch for HTML pages; each site owner controls them with Site Pages > … > File types > Allow HTML files.
- On my tenant that setting hid the menu options, but a member could still add and publish HTML pages through Copilot chat and the REST API.
- PnP PowerShell can report the HtmlPages feature, every HTML page and every HTML view on a site, so you know what exists before you write rules.
On this page
What you can control
| Control | Where | Who | What it did on my tenant |
|---|---|---|---|
| Allow HTML files | Site Pages > … > File types | Site owner | Off: removed the HtmlPages feature (web scope), hid HTML page in + New, and Create or upload became Create. It didn’t stop HTML getting in (next section). |
| Copilot licence | Microsoft 365 admin center | Licence admin | Needed to create or edit with Copilot. Not needed to upload, edit text, publish or view. |
| Keeping a site out of Copilot | SharePoint admin center | SharePoint admin | On my restricted IT Service Desk site, + New had no HTML page and Add view had no Dashboard. Upload still worked. |
| HTML Field Security | Settings > Site information > View all site settings > HTML Field Security | Site owner | Not tested. Microsoft documents it as the allow-list for links to outside domains. |
| Site and item permissions | As usual | Owners | Pages and live data follow existing permissions. |
Microsoft confirmed in the comments on the October launch blog that there won’t be a tenant-level off switch for now. That’s a pity for regulated tenants. If you need to find which sites are kept out of Copilot, see Three ways to find which SharePoint sites have Copilot blocked.
Testing the Allow HTML files setting
I used the MST Social Club test site, signed in as Tim Devis (member, Copilot licence), with the setting Off.

| Test as a member, setting Off | Result |
|---|---|
| + New menu | No HTML page option |
| Site Pages command | Create only, no upload options |
| Upload an .html file to Site Pages through the REST API | Accepted; opened as an HTML page with Publish page |
| Publish page on that file | Published |
| Copilot chat on the site: “Create an HTML page for this site announcing…” | Created MST-Social-Club-Quiz-Night.html in Site Pages |

A commenter on the launch blog reported the same, and Microsoft replied that uploads and moves should be blocked and that it’s looking into Copilot creation. Until that’s fixed, treat the setting as a way to tidy the menus, not as a control. A member who can add files to Site Pages can add HTML.
I switched the setting back on afterwards; the feature came back at web scope.
How the page is isolated
I checked the published page in the browser. The HTML runs in an iframe with sandbox="allow-scripts" and nothing else. In practice:
- No
allow-same-origin: the page’s script can’t read the SharePoint session or call SharePoint or Graph as the user. - No
allow-forms: a form on the page can’t submit anywhere. - SharePoint publishes the full Content Security Policy on every tenant at
https://[tenant].sharepoint.com/_html: no outbound requests (connect-src 'none'), no form submission, no external scripts, styles, images or fonts. The only scripts from outside the page are a short list of libraries SharePoint injects itself, such as Chart.js, D3, Mermaid, React and Fluent UI.
Live data comes in a different way. The page declares a small manifest naming the list and the columns, and SharePoint loads the rows for it as the signed-in viewer. The Experiments dashboard read only the six columns it named. Tim, with read access to the R&D site, saw the same counts I did.
What isn’t covered by the sandbox is content. A member can publish any text, links or images in an HTML page, the same as a modern page, but with far more freedom in how it looks. If your intranet has publishing rules, Microsoft lists scheduling and approvals as supported for HTML pages, so content approval on Site Pages covers them too.
Lists: HTML views
A Dashboard view is stored as an ordinary list view with ViewType2 = CUSTOMHTML; the HTML sits in the view’s formatter JSON (about 414 KB for my Experiments view). Two points matter for admins:
- A Dashboard view is always public. The personal view option disappears, so any member who builds one adds it for everyone.
- Copilot saved my work orders view with a row limit of 10,000 and no filter. On a 5,500-item list it failed with “Unknown render failure. The number of items in the list exceeds the list view threshold, which is 5000 items.” Adding a filter on an indexed column fixed it (script below).
The data respects item permissions: the PMO Risk Register view showed 597 items to a member and 600 to me. The end-user side is in HTML dashboard views on SharePoint lists.
Page permissions, retention and clean-up
HTML pages are list items in Site Pages, so the usual tools apply:
- Share on the page adds people; for a restricted page, the item can have unique permissions like any other Site Pages item. The report below shows which HTML pages have them.
- Drafts are minor versions; my page went from 0.1 to 2.0, and older versions can be restored.
- MC1479517 says pages follow existing SharePoint storage and retention, so retention policies on the site cover them.
- Copilot saves a placeholder (Page.html) as soon as you start, and drafts pile up. Use the report below to find HTML pages not published or not modified in months, then delete them or move them out. For a whole inactive site, Microsoft 365 Archive still works at site level.
Report HTML pages and views with PowerShell
Two read-only functions for my MSTechTalk.M365 module cover this. Both need PnP.PowerShell 3.x, PowerShell 7.4 and your own Entra app registration.
The first lists the HTML pages in a site’s Site Pages library and says whether the HtmlPages feature is on:
Connect-PnPOnline -Url $SiteURL -Interactive -ClientId $ClientId
. .\Get-MttHtmlPage.ps1
Get-MttHtmlPage -SiteUrl $SiteURL -IncludePermission | Export-Csv .\HtmlPages.csv -NoTypeInformation -Encoding UTF8
Output columns: SiteUrl, HtmlPagesFeature, PageName, PageUrl, Title, Version, IsPublished, SizeKB, CreatedBy, Created, ModifiedBy, Modified, HasUniquePermission.
The second finds every Dashboard (HTML) view on the site’s lists and libraries:
. .\Get-MttHtmlView.ps1
Get-MttHtmlView -SiteUrl $SiteURL | Export-Csv .\HtmlViews.csv -NoTypeInformation -Encoding UTF8
Output columns: SiteUrl, List, ListItemCount, ViewTitle, ViewId, ViewUrl, IsDefaultView, HtmlSizeKB, LiveDataColumns. A row with ListItemCount over 5,000 is the one to check first.
To fix a Dashboard view on a large list, give it a filter on an indexed column. This changes the view, so run it on a test list first:
# PnP.PowerShell: add an indexed filter and a 5,000 row limit to an HTML view
$SiteURL = "https://mstalk.sharepoint.com/sites/MST-Operations" # Replace with your own
Connect-PnPOnline -Url $SiteURL -Interactive -ClientId $ClientId
$query = "<Where><In><FieldRef Name='WOStatus'/><Values><Value Type='Text'>New</Value><Value Type='Text'>Assigned</Value><Value Type='Text'>In Progress</Value></Values></In></Where>"
Set-PnPView -List "Maintenance Work Orders" -Identity "Open work orders by facility, priority and age" -Values @{ ViewQuery = $query; RowLimit = [uint32]5000 }
I ran this on my demo tenant with PnP.PowerShell 3.5.0. The view stayed a Dashboard view and the filter returned 1,657 open work orders, matching the list. Two things caught me. RowLimit has to be passed as [uint32]: a plain 5000 is ignored with a type-conversion warning, and the old row limit stays. And ViewQuery replaces the whole query of the view, so if the view already sorts or groups, copy its <OrderBy> or <GroupBy> into $query first (Get-PnPView -Includes ViewQuery shows it).
Try it yourself
- Calling lines: above.
- Permissions: read access to the site (site collection admin to see every page and view).
- Tested: 30 November 2026 with PowerShell 7.6 and PnP.PowerShell 3.5.0 on five sites of my demo tenant.
- Full scripts: GitHub: SharePoint-HTML-Pages





Leave a Reply