How many microsoft graph rest sendMail HTTP error code?

xu liq 0 Reputation points
2023-11-08T03:27:48.56+00:00

How many microsoft graph rest sendMail HTTP error code?

Where can I get these error codes?

https://learn.microsoft.com/en-us/graph/api/user-sendmail?view=graph-rest-1.0&tabs=java

from the document I only get code: 202,400

I need these error codes and handle them accordingly to ensure the robustness of our email service.

Thank you!

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

1 answer

Sort by: Most helpful
  1. Diah.Karim-MSFT 330 Reputation points Microsoft Vendor
    2023-12-26T01:27:34.7066667+00:00

    Hi Xu Liq,

    By default as you mentioned from the https://learn.microsoft.com/en-us/graph/api/user-sendmail?view=graph-rest-1.0&tabs=java the expected http status code are 202 & 400

    But as for your case, maybe you can refer to below document.

    https://learn.microsoft.com/en-us/graph/errors

    I believed not all listed above for Http error code will be returned but i can see couple of potential Http status code like

    • 401 - Unauthorized
    • 403 - Forbidden
    • 404 - Not Found
    • 405 - Method Not Allowed
    • 406 - Not Acceptable
    • 413 - Request Entity Too Large
    • 415 - Unsupported Media Type
    • 429 - Too Many Requests
    • 500 - Internal Server Error
    • 503 - Service Unavailable
    • 509 - Bandwidth Limit Exceeded

    Hope this helps.

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

    0 comments No comments

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.