Search code examples
apiemailoutlookmicrosoft-graph-apioutlook-restapi

get particular Value from InternetMessageHeader in outlook api


On calling /me/messages Outlook API, it returns details of every message including Internet Message Headers, but can we select specific named headers from that. Because while dealing with large amount of data this may reduce some memory... And on performance wise too, it reduces the iterations to search for specific message...


Solution

  • Depending on the Internet header property you want to look at it most get promoted as Extended properties onto the Message so if you use singlevalueextendedproperties definition https://learn.microsoft.com/en-us/graph/api/singlevaluelegacyextendedproperty-post-singlevalueextendedproperties?view=graph-rest-1.0 of that particular property you can get and filter on particular internet headers. You can use a MAPI editor like MFCMapi or OutlookSpy to see what particular extended properties are available on Message.