Unable to Retrieve Message-Id for Reply Email Using Graph API

Trong Le 20 Reputation points
2024-09-11T09:02:11.21+00:00

Dear Microsoft Support Team,

I hope this message finds you well. I am currently facing an issue with using the Microsoft Graph API to handle Reply emails. Here are the details of the problem:

Issue Description:

I have successfully sent an email (referred to as email A) using the Graph API.

However, after sending email A, I am unable to retrieve the Message-Id or any data related to it through the API. This prevents me from referencing email A when attempting to process subsequent actions (there is only HTTP/1.1 202 Accepted as the response).

Specific Problem:

Now, I need to send a Reply email (referred to as email B) in response to email A.

The Microsoft Graph API documentation specifies that to send a reply using the API, the previous email's Message-Id is required (POST /me/messages/{id}/reply).

Challenge:

Without access to the Message-Id of email A, I am unable to programmatically generate a reply to it using the Graph API.

Request:

Could you please assist in resolving this issue by providing guidance on how to retrieve the Message-Id of email A after it has been sent?

  • Alternatively, is there another method or API endpoint that allows access to the necessary identifiers for email A so that I can proceed with sending a reply (email B) using the Graph API?

Your prompt assistance in this matter would be greatly appreciated. Please let me know if further information is required to address this issue effectively.

Thank you for your attention to this matter.

Best regards,
Mike

Outlook
Outlook
A family of Microsoft email and calendar products.
3,850 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,041 questions
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 42,026 Reputation points
    2024-09-11T09:33:28.91+00:00

    Hi @Trong Le

    Yes, it only returns a status code without including the message ID.

    However, you have several methods to retrieve the sent email, such as filtering by subject:

    GET /me/messages?$filter=subject eq 'your email subject'
    

    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.


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.