How to get a latest email conversation message and its attachments only either it is a reply or single email? Now, GraphAPI is gives latest email thread , so the entire conversations coming inside the body ? Any way to achieve this

Yabesh 0 Reputation points

The below code I have tried, usually the entire conversation messages inside the single email thread is coming inside the body as a html, but I want the latest reply email conversation message and with its attachments only, not the previous conversation messages inside that same email thread. Please let me know, how to achieve this?

folder_url = f'{folder}/messages?$top=1&$orderby=receivedDateTime desc'
        folder_r = requests.get(folder_url, headers=headers)
A family of Microsoft email and calendar products.
3,393 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,345 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. akinbade abiola 8,300 Reputation points

    Hello Yabesh,

    Maybe try this?


    You can mark it 'Accept Answer' if this helped you