sendMail api gives 202 response but not able to send mail in micro soft graph api

Dhage, Endraja (CIB Tech, IND) 0 Reputation points

Hi ,

I am trying send and read mail from shared mailbox using microosft graph api in python.

I am able to generate token using MSL library :

after token generation i am trying to send mail using sendMail api :{User Id}/sendMail

In response i am getting 202 status code.

but mail is not getting send.

Please help me

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
9,101 questions
Exchange Server Development
Exchange Server Development
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Development: The process of researching, productizing, and refining new or existing technologies.
466 questions
{count} votes

1 answer

Sort by: Most helpful
  1. TH-4749-MSFT 3,360 Reputation points

    Hi Dhage, Endraja (CIB Tech, IND),

    Thanks for reaching out. Please check if the message was not blocked on the recipient end. Also check the Sent Items folder of the sender mailbox to see if it contains the sent message or if an NDR was received in the Inbox. I was able to test the graph api call and response body mentioned in the article you provided via Graph Explorer ( with message successfully delivered to recipient mailbox.


    0 comments No comments