1

I am using Graph API with my Outlook Web Add in and have noticed that the headers i see when clicking the email > File > Properties , do not match up with the headers that are returned from the Graph API.

From, To, In-Reply-To and MessageID are ones I've noticed so far that are missing.

Are there certain permissions that i need to set up on the app side , or something i am missing in my request, or something different here that is causing these headers to be ignored ? Here is my request for reference:

"https://graph.microsoft.com/v1.0/me/messages/" + restID + '/ $select=internetMessageHeaders'

Any insight to this is much appreciated, thank you!

944jmc
  • 39
  • 7

1 Answers1

3

You can get the unparsed Internet headers via the PidTagTransportMessageHeaders extended property https://learn.microsoft.com/en-us/office/client-developer/outlook/mapi/pidtagtransportmessageheaders-canonical-property which will include everything eg

https://graph.microsoft.com/v1.0/me/MailFolders('Inbox')/messages('...=')?$select=InternetMessageHeaders&$expand=singleValueExtendedProperties($filter=id eq 'String 0x007D')

I don't know why not all headers are included in the InternetMessageHeaders collection (most likely it's due to the way they implemented their parser) the ones you have mentioned are all available in other strongly typed and extended properties.

Glen Scales
  • 20,495
  • 1
  • 20
  • 23