MIME format support for Outlook mail and attachments in Microsoft Graph (preview)

Sivaprakash Saripalli

Today we’re excited to announce the release of two highly requested APIs to the Microsoft Graph beta endpoint. These allow you to retrieve the contents of an email message in MIME format and to download file, item attachments in their raw format.

Many scenarios require an app to download and store the raw contents of an email. Imagine a service desk application that creates a service ticket for every new email received from users. In addition to monitoring for new emails via change notifications, the application can now download the email in MIME format, including attachments, and attach it to the service ticket. Note that this feature adds support for MIME export only for messages, not other item types like events or contacts. If you need MIME export for events or contacts, let us know by voting up this request on our UserVoice forum. If you’re looking for the ability to upload MIME to create or edit an email message, vote up this feature request on User Voice.

You can now download file attachments in binary format, allowing for faster, more efficient downloads compared to base64 format. You can also download item attachment content in MIME format, and use it to get details of nested attachments.

We’ve had a number of requests for these APIs, and we can’t wait to see what you’ll create with them. These features are available today on the beta endpoint as /me/messages/{message-id}/$value and /me/messages/{message-id}/attachments/{attachment-id}/$value. You can try them out using Microsoft Graph Explorer.

Please let us know if you have additional feedback or suggestions for new functionality. Happy coding!

Feedback usabilla icon