Why does sending large attachments (>3MB) with MS Graph API just works without upload session?

Frederik Gysel 20 Reputation points
2024-12-27T16:44:34.2433333+00:00

Hi,

I read that there are limitations on sending e-mails with attachments larger than 3MB: upload session should be used.

Reference: https://zcusa.951200.xyz/en-us/graph/outlook-large-attachments?tabs=http

However when I try to send an email with an attachment of 10MB via the 'normal' way, it just works

Reference, see example 3: https://zcusa.951200.xyz/en-us/graph/api/user-sendmail?view=graph-rest-1.0&tabs=http

Can somebody please explain to me why I should work with upload session if sending attachments >3MB just works via the normal way?

Thx

Frederik

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

Accepted answer
  1. CarlZhao-MSFT 44,036 Reputation points
    2024-12-30T08:43:34.33+00:00

    Hi @Frederik Gysel

    The documentation you referenced is correct in stating that for files under 3 MB, you can use a single POST request, and for files between 3 MB and 150 MB, you should create an upload session and use PUT requests to upload the file in chunks.

    However, if you were able to upload a 10 MB file using a single POST request, it might be due to specific configurations or updates in the API that allow for larger file uploads in certain scenarios. It's also possible that the API has some flexibility or that there are exceptions not explicitly mentioned in the documentation.

    To ensure consistent behavior and avoid potential issues, it's generally best to follow the recommended approach in the documentation. If you continue to experience discrepancies, you might want to check for any recent updates or changes in the API documentation or reach out to Microsoft support for clarification.


    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.