Microsoft Graph API | Request and Response Max Payload size

Abhay Chandramouli 966 Reputation points

I want to know the maximum allowed payload (in KB/MB) size for request and response for

/users POST

/users PATCH

/users GET

/users DELETE


Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,839 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Unknown_Beast 145 Reputation points

    The maximum allowed payload size for requests and responses in Microsoft Graph API varies based on the specific endpoint being used and the HTTP method being used (e.g. POST, PATCH, GET, DELETE). Additionally, the maximum payload size may also depend on other factors such as the authentication method being used and the type of data being sent or received.

    As a general rule, the maximum payload size for requests and responses in Microsoft Graph API is typically limited to 4MB. However, some endpoints may have lower limits, such as 1MB or 2MB.

    To find the specific maximum payload size for a given endpoint and HTTP method, you can consult the Microsoft Graph API documentation. Each endpoint documentation page includes a "Request body" section that specifies the maximum payload size for that endpoint.

    For example, the documentation for the /users POST endpoint specifies a maximum payload size of 4MB, while the /users PATCH endpoint has a maximum payload size of 2MB. The /users GET and /users DELETE endpoints do not have a request body, so the maximum payload size for those endpoints is not relevant.

    Keep in mind that exceeding the maximum allowed payload size for a given endpoint can result in errors or data loss, so it is important to ensure that your requests and responses stay within the specified limits.

    0 comments No comments

  2. Zehui Yao_MSFT 5,831 Reputation points

    Hi Abhay Chandramouli at the same time, Graph also supports uploading large files (larger than 4MB) by creating an upload session

    POST /drives/{driveId}/items/{itemId}/createUploadSession

    Then upload the file content to the upload session :

    Content-Length: 26
    Content-Range: bytes 0-25/128
    <bytes 0-25 of the file>

    You can refer to this documentation:

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments