How to fetch InternetMessageHeaders for messages in SENT box

Venkatesh Nambiyar 5 Reputation points
2024-02-06T09:30:05.65+00:00

How can I fetch the InternetMessageHeaders for sent mail messages in my SENT box using the Microsoft Graph API? I have tried using the following URL: https://graph.microsoft.com/v1.0/me/messages/{id}/?$select=internetMessageHeaders and received the response shown in this image: Reponse in Graph Exploxer.png.

Outlook
Outlook
A family of Microsoft email and calendar products.
3,076 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,771 questions
Outlook Management
Outlook Management
Outlook: A family of Microsoft email and calendar products.Management: The act or process of organizing, handling, directing or controlling something.
4,927 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Vasil Michev 96,436 Reputation points MVP
    2024-02-06T09:40:10.2033333+00:00

    You cannot. Those headers are added by the server(s), only after the message has been sent. The copy of the message stored within the Sent Items folder will not reflect them.


  2. Fred Cox 0 Reputation points
    2024-05-03T14:47:09.7333333+00:00

    The answer appears to be that you can get the 'raw' content of the message - with /$value and you can parse the headers yourself

    0 comments No comments