Hello Andrew Earl,
Greetings from Microsoft Support!
It sounds like you’re encountering an issue with .msg attachments in Outlook for Windows using Graph API. The contentBytes
property is not directly available for .msg attachments because they are treated as itemAttachment
rather than fileAttachment
.
To retrieve the content of a .msg attachment, you can use the $value
segment in your request URL. Here’s how you can do it:
- Get the attachment details:
GET https://graph.microsoft.com/v1.0/me/messages/{messageId}/attachments/{attachmentId}
- Retrieve the raw content:
GET https://graph.microsoft.com/v1.0/me/messages/{messageId}/attachments/{attachmentId}/$value
This will return the raw contents of the .msg file. Please check documentation.
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.