adh3141
adh3141

Reputation: 51

How to retrieve Internet (Message) Headers via Office 365 REST API?

I am currently working on a project in python to interface with the Office365 REST API, but I need to retrieve (all of) the Internet Message Headers for specific emails.

I've used the $metadata file to research the exposed properties and I don't see an obvious method to access this information.

I know that you can access the headers in OWA using "Message Details" so I would think that the information is web-accessible (even if it is not through the REST API).

Any help would be appreciated.

Upvotes: 5

Views: 763

Answers (2)

Elliot Fiske
Elliot Fiske

Reputation: 1268

This is now possible in 2019.

In your $select parameter, you can now specify InternetMessageHeaders to get all the MIME message headers.

Tested using this Postman request:

https://gist.github.com/elliotfiske/ccf81266be6ead10823a53c094749234

Be sure to substitute in your own Bearer auth token.

Upvotes: 1

holic87
holic87

Reputation: 791

Apparently, it's not supported currently, but on the roadmap to add according to this answer:

How to fetch email headers with Office 365 Mail REST APIs?

Upvotes: 0

Related Questions