SharePoint Document Issues

How to Fix Microsoft Graph SharePoint Pages API POST Payload Size Limit

Ayan MasoodAyan Masood Oct 22, 2026 870 views

Question details

The user's API request fails when attempting to create a SharePoint page using the Microsoft Graph beta API because the rich text HTML content payload exceeds the 1 MB limit.

Fixing the Microsoft Graph SharePoint Pages API POST Payload Size Limit
Product
Microsoft Graph API
Device & OS
not provided
Scenario
Creating a SharePoint page with rich text HTML via a Microsoft Graph API POST request.
Observed behavior
The request fails with an error indicating 1,049,600 bytes were read against a 1,048,576-byte (1 MB) maximum limit for a part of the request.
Before you start

Ensure you have access to your API request logs and the raw HTML payload you are attempting to send to the Microsoft Graph endpoint.

Solution 1Recommended

Reduce or Split the HTML Content Payload

Adjust your API request payload to comply with the 1 MB endpoint-specific limit for SharePoint Pages.

Although Microsoft Graph generally allows request payloads up to 4 MB, the beta SharePoint Pages endpoint imposes a strict 1 MB (1,048,576 bytes) limit on specific properties like htmlContent. You must treat this as a hard endpoint limit rather than relying on the general Graph API threshold.

1
Check current payload size

Review your POST request payload and calculate the exact byte size of your htmlContent string. If it exceeds 1,048,576 bytes, the request will be automatically rejected.

2
Minify the HTML content

Remove unnecessary whitespace, redundant comments, and excessively large inline CSS or scripts from your HTML content to significantly reduce the overall byte size.

3
Externalize embedded media

Check your HTML for Base64 encoded images. Embedded Base64 images massively increase payload size. Host these images externally on SharePoint and reference them using standard absolute image URLs.

4
Split the request into smaller updates

If the content remains too large after optimization, create the base SharePoint page first with a minimal payload. Use subsequent PATCH requests or canvas web part endpoints to add additional sections sequentially.

Reduce or Split the HTML Content Payload
Beta Endpoint Constraints: Because the SharePoint Pages endpoint is in beta, property limitations and behaviors are subject to change. Always consult the latest Microsoft Graph API changelog.
Free Microsoft Office alternative

Create and Manage Content Efficiently with WPS Office

While API payload limits restrict direct HTML publishing to SharePoint, managing your source documents offline shouldn't be difficult. WPS Office provides a free, lightweight, and highly compatible alternative to Microsoft Office for creating, editing, and formatting documents before converting them into web content.

Fully compatible with Microsoft Word, Excel, and PowerPoint formats (.docx, .xlsx, .pptx).Lightweight installation with fast loading speeds, minimizing system resource usage.Familiar user interface ensuring seamless migration without a steep learning curve.Free built-in PDF tools to help you export and manage content easily before publishing online.
microsoft office alternative - wps office

Frequently Asked Questions

What is the maximum payload size for Microsoft Graph API requests?

Generally, Microsoft Graph requests and responses are limited to approximately 4 MB. However, specific endpoints, such as the beta SharePoint Pages API, enforce lower limits like 1 MB for certain properties such as HTML content.

Why do I get a 1,048,576-byte maximum error when creating a SharePoint Page via API?

This error occurs because the htmlContent or rich text payload in your POST request exceeds the 1 MB size threshold explicitly set by the SharePoint Pages API endpoint.

Can I increase the payload limit for the Microsoft Graph API?

No, endpoint-specific payload limits are enforced strictly by the Microsoft Graph service and cannot be manually overridden or increased. You must either reduce your payload size or split your data across multiple API requests.

How can I easily reduce my HTML payload size for SharePoint Pages?

You can effectively reduce your payload by minifying your HTML strings, stripping out inline CSS and unnecessary tags, and ensuring all images are linked via standard URLs rather than being embedded directly as Base64 encoded strings.