How to get message id after sending email using Graph API?

Dinesh Raja 0 Reputation points
2023-12-06T07:05:41.1233333+00:00

I have sent email using Graph API from C# dotNet. How to get message id of the email after sent?

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 46,371 Reputation points
    2023-12-07T06:20:22.4166667+00:00

    Hi @Dinesh Raja

    You can use the message subject to filter the mailbox to find the target message.

    var result = await graphClient.Me.Messages.GetAsync((requestConfiguration) =>
    {
        requestConfiguration.QueryParameters.Filter = "subject eq 'xxxxxxxxxxxxxxxxxx'";
    });
    

    User's image

    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.


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.