Retrieve mails using internet Message id

Anonymous
2023-04-23T17:26:00.7233333+00:00

How to get mails using Internet message_id.

******@xxxxxxxxxxxx.INDPRD01.PROD.OUTLOOK.COM

GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();

Message message = graphClient.me().messages("<******@xxxxxxxxxxxx.INDPRD01.PROD.OUTLOOK.COM>")
	.buildRequest()
	.get();
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. msft-gu 1,355 Reputation points
    2023-04-24T16:54:46.2266667+00:00

    Hi Venkatesh, Good morning and thank you for your question! I was able to collect an email using the InternetMessageID in Graph by using the GET method:

    GET https://graph.microsoft.com/v1.0/me/messages?$filter=internetMessageId eq '<internet_message_id>'
    

    Under the Graph Explorer, I go to Code Snippets and click on Java tab and it presented this code:

    GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
    
    Message message = graphClient.me().messages()
    	.buildRequest()
    	.filter("internetMessageID eq '<******@xxxxxxxxxxxx.INDPRD01.PROD.OUTLOOK.COM'">
    	.get();
    

    I hope I was able to answer your question! If I have, please do not forget to Upvote and click Accept as answer if this reply is 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.