When I open email message in the office365 web browser page, there is an option to DOWNLOAD contents of the attached to this email itemAttachment ( another message attached to the current one using Microsoft Outlook ) - *.eml file, (contentType: RFC-822).
However, when I'm trying to get the contents of this itemAttachment through Graph API (same operation), the contentBytes response property is not present.
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#users('bbbbb')/messages('fffff')/attachments",
"value": [{
"@odata.type": "#microsoft.graph.itemAttachment",
"id": "gggg",
"lastModifiedDateTime": "2017-02-13T16:29:45Z",
"name": "The Daily Build - Compiling your C code to .NET",
"contentType": "message/rfc822",
"size": 99129,
"isInline": false
}
]
}
Any ideas how to get contents of attached outlook message though Graph API ( contentType=itemAttachment )? The fileAttachment contentType is working fine, I can grab the contents from the contentBytes property of the Graph API response. The following API endpoints are considered:
https://graph.microsoft.com/beta/me/messages/{id}/attachments
https://graph.microsoft.com/beta/me/messages/{id}/attachments/{attachmentId}
https://graph.microsoft.com/beta/me/messages/{id}/attachments/{attachmentId}?$expand=#microsoft.graph.itemAttachment/item
neither of the above returns contents of the attached Item.