How to Get MIME content of an Outlook message excluding attachments

Mahammed Aslam 26 Reputation points
2021-10-13T14:49:25.553+00:00

We have a business requirement to store Outlook message as .eml for future references from code base but without attachments.

We found below GRAPH API GET method to retrieve Outlook message's MIME content but can't find option to filter out attachments(to exclude/skip attachments by which .eml file size reduced drastically.)

https://graph.microsoft.com/v1.0/me/messages/4aade2547798441eab5188a7a2436bc1/$value

Please share option or workaround to exclude attachments under GET Method(GET /users/{id}/messages/{id}/$value)

Ref URL - https://learn.microsoft.com/en-us/graph/outlook-get-mime-message

@CarlZhao-MSFT @Glen Scales @Vasil Michev @SadiqhAhmed-MSFT @Deva-MSFT

It would be really appreciable if someone from MS team could officially clarify on above business case

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,708 questions
{count} votes

Accepted answer
  1. CarlZhao-MSFT 37,296 Reputation points
    2021-10-14T09:08:57.577+00:00

    After many tests, I can come to the conclusion: currently does not support filtering attachments. So I suggest you submit a feature request for filtering attachments, and I will vote for you.


    If an Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful