How to Fix Microsoft Graph SharePoint Pages API POST Payload Size Limit
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.

- 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.
Ensure you have access to your API request logs and the raw HTML payload you are attempting to send to the Microsoft Graph endpoint.
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.
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.
Remove unnecessary whitespace, redundant comments, and excessively large inline CSS or scripts from your HTML content to significantly reduce the overall byte size.
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.
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.

Consult Official Documentation and Developer Forums
Verify the latest API limits and seek support for beta endpoints directly from Microsoft engineers.
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.

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.




