MS-Graph Attachment limits

Rajat M Jain 41 Reputation points
2021-03-30T06:47:38.69+00:00

The attachment limit of 3MB applies to the attachment content or the base64 encoded attachment contents?
In other words, is it allowed to POST an attachment to a message in Microsoft Graph when the base 64 encoded contents are more than 3MB but the actual file is less than 3MB?

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

Accepted answer
  1. Glen Scales 4,431 Reputation points
    2021-03-30T23:50:47.82+00:00

    The actual upload limit is 4mb which is because the largest value a JSON string can be is 4mb, the guidance around 3MB is because Base64 encoding bloats a message from its binary size by up to 33% so a file size below 3MB should mean once encoded your not going to have a problem. But you always need to go off the encoded size rather the binary size.

    0 comments No comments

0 additional answers

Sort by: Most helpful