how to fetch mail content without old mail data in ms graph mail api

Abounaja IP - IT Department 1 Reputation point
2020-05-19T14:56:28.127+00:00

Dear all,

We are using MS Graph API for a web application. we need to fetch all mails based on the conversationId, mails are replying with the same email they received. they will not delete the mail content when they replied. so the replied mail has the previous mail content.
the problem is when we fetching the mail using graph api, it will return the whole message (including the mail content they received ).
is there any way to get mail response without the previous mail content?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,875 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,464 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Saurabh Sharma 23,676 Reputation points Microsoft Employee
    2020-05-19T23:49:14.303+00:00

    Are you using 'me/messages' to pull your emails? You can use $top=1 along with ConvesationId filter to get the latest conversation from the returned result. For example -

    https://graph.microsoft.com/v1.0/me/messages/<Message ID>?$(filter=ConversationId eq <Conversation Id>)&$top=1