Get MIME Message from SentItems fails

Matt Fitzmaurice 36 Reputation points
2023-08-22T13:52:19.5833333+00:00

https://learn.microsoft.com/en-us/graph/api/message-get says that it is possible to get both the JSON and the MIME content of a message in a mail folder provided I supply the message ID.

GET /me/mailFolders/{id}/messages/{id}
GET /me/mailFolders/{id}/messages/{id}/$value

I can successfully get the JSON data for a message in my Sent Items folder, however I am unable to get the MIME content (using the Graph Explorer and in C# code).

I get the following error. Am I doing something wrong?

{
    "error": {
        "code": "ErrorInvalidRequest",
        "message": "The OData request is not supported."
    }
}
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,517 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. TH-4749-MSFT 3,315 Reputation points
    2023-08-22T18:15:33.8233333+00:00

    Hello Matt Fitzmaurice,

    Thanks for reaching out. The $value parameter is not supported for the me/mailFolders/messages/[id] endpoint. I am able to reproduce the issue. You would need to use the me/messages/[id]/$value query to get the MIME content.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    Thanks.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.