0

Background:

We have created 2 Azure single-tenant apps with the same set of permissions (Mail.Send & Mail.ReadWrite) within the same tenant. As per Graph API's documentation, we should be able to send emails of size upto 150 MB per email, through 1 app and 1 mailbox combination.

Link - https://learn.microsoft.com/en-us/graph/throttling-limits#outlook-service-limits

Problem:

Since the documentation mentions the combination, so ideally if we have 2 different Azure apps, then we should be able to send 2 separate emails of size 150 MB each (total 300 MB) within 5 minutes from the same mailbox.

But unfortunately, it does not work. We get a throttling error from Graph API when trying to draft 2nd email-

{
    "error": {
        "code": "ApplicationThrottled",
        "message": "Application is over its IncomingBytes limit."
    }
}

Question:

When the documentation mentions the combination, then why is the API not allowing to upload more than 150 MB (2 separate emails) in the same mailbox within 5 minutes using 2 different Azure apps?

Example:

  • Create Authorization token1 from App1.
  • Create a draft email in mailbox1 and upload a 140 MB file using the upload session.
  • Create Authorization token2 from App2.
  • Create another draft email in the same mailbox1 and upload a 140 MB file using the upload session. It fails at this step with the above error.
6
  • Raise a support ticket with MicroSoft. It may be that the linked details are not completely accurate, only MS would know for sure. Commented Jun 25, 2024 at 8:53
  • 1
    Already created one ticket, this question will allow me to know if anyone else faced the same issue and I can post updates about my MS ticket here. Commented Jun 25, 2024 at 8:57
  • You need to consider MIME bloat as well, while you attachment size maybe under 150 when you try to send it will bloat 137% en.wikipedia.org/wiki/Base64#MIME so 140MB is generally still going to be too large. Commented Jun 26, 2024 at 1:19
  • @GlenScales I have replicated the issue through Postman while uploading a 120 MB PDF in 2 separate emails in the same mailbox through 2 different apps. It's successful in app1 but fails with app2. Commented Jun 26, 2024 at 8:25
  • The documentation isn't clear on this (it's ambiguous) but my understanding of this is when you use Service principals (eg client credentials flow) this uses impersonation. So while your using different App's/Service principals the throttling budget is still being charged against the impersonated user. You would probably find that using a Delegate Token and an Application token against the mailbox would work (within the 5 minutes window) because they tend to be separate throttling budgets. It's done this way I believe to limit the service impact per mailbox. Commented Jun 27, 2024 at 0:07

1 Answer 1

0

After creating a support ticket for Microsoft and following up with them for the last 1 month, the conclusion is that this is not allowed by design.

Here's the updated documentation to avoid any further confusion. Now both the API behaviour and documentation match with each other:

Updated documentation

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.