Expose the entire email MIME stream (whole mail ContentBytes) in Outlook Mail REST API
Sending REST request to Outlook Mail endpoint for messages brings back email message object with properties such as: Subject, From, To, Body but it doesn't expose the MIME stream for the whole email. Actually this is required to save the entire email maybe as eml file locally or somewhere.
hope this option will be available soon within the REST response
This feature is currently being tested in private beta. Please reach out to firstname.lastname@example.org if you are interested in reviewing and providing feedback!
is there any size limitation? for example, will it work for an email with a 10MB attachment?
Eric Ruck commented
Is there some kind of ticket number we can follow on this feature to know when it is released? This isn't the messages/(messageid)/$value endpoint is it?
Is there any update?
Would love to see this move out of beta, is there an ETA?
Are there any further updates on this? I tried the beta version end point but no traces of contentBytes for itemAttachments.
Below comment works only for fileAttachments not for the itemAttachment. For fileAttachment the v1.0 end point also returns the contentBytes. This post is only about itemAttachment.
Looks like it's still only in beta and undocumented, but it seems to work (if you're willing to risk querying the beta API from your production app).
Syntax: GET /me/messages/ID/$value
The only limitation (that I can tell) is that it's limited to returning a single message per query. You cannot select/filter to retrieve raw rfc822 messages in bulk. I assume there are performance limitations due to the architecture of the underlying data and API. i.e. It may be difficult to port a client, like Thunderbird, to fully sync all raw messages using Graph instead of IMAP.
Tuan Do commented
Have there been any updates on this?
Joey McAdams commented
Have there been any updates on this? Updated ETA or anything?
Yves Dhondt commented
It should go both ways: we should be able to retrieve the entire mime stream as well as put it. This is especially important for sending and retrieving signed and encrypted messages.
Raed Alahmad commented
Great to know you've started on this, it should be helpful. Thanks
anu katari commented
Sounds great !!
But will there be any size limitation with this feature ?
Seems that only works after creating draft message, once you have sent the email, it is not there anymore. This what I got after sending the email.
"message": "The specified object was not found in the store., The process failed to get the correct properties."
I dont know if it has been moved to any other folder but couldnt find it. Is anyone having the same issue?
It actually already works, not documented afaict
in the GET request
Lindsay Snider commented
You can sometimes get the raw headers with that link: https://stackoverflow.com/questions/38103388/is-it-possible-to-retrieve-the-rfc-2822-or-any-headers-from-an-email-with-the but it still does not work in the 'Sent Items' folder. It's hard to see who replied to who when half of the conversation does not have the headers.
Agreed! We need to be able to download the entire, raw MIME message.
Mathew Kleppin commented
Currently not working. The below comment didn't give me anything. I would love this to be implimented!
Eirik Brandtzæg commented
Try https://graph.microsoft.com/beta/me/messages/<message id>/$value
Is it working now?
Josh Rickard commented
I agree with this! This limit is 1MB and should be the entire MIME stream.
Corey Larson commented
This is something critical to me as well. Apparently its on the roadmap somewhere?