0

I am working on integration with Microsoft Graph and can't find a way to list all replies for specific email so the user can respond to it

we have implemented this idea on Gmail API through the thread concept but in Microsoft Graph we found that the thread word has different use

I have found something in common between the original mail and its replies which is conversationId but it's impossible to get and filter all sent messages and also received ones to just find the mails have the same conversationId

Marc LaFleur
  • 31,987
  • 4
  • 37
  • 63
Mohamed Samir
  • 367
  • 3
  • 9

1 Answers1

2

I'm not sure where you got the idea that you can't filter on conversationId but it absolutely can be. The following will return any messages matching the conversation:

/v1.0/me/messages?$filter=conversationId eq '{conversationId}'
/v1.0/users/{id|userPrincipalName}/messages?$filter=conversationId eq '{conversationId}'
Marc LaFleur
  • 31,987
  • 4
  • 37
  • 63
  • will get the replies of the two sides of the conversation? another thing outside this issue , can i get the mail id after sending it in the response with 202 accepted? – Mohamed Samir Aug 28 '19 at 23:18
  • Yes, it should retrieve all of the messages with that `conversationId` from the mailbox regardless of the folder its in. I'm not sure what you mean by getting the mail id after sending. – Marc LaFleur Aug 29 '19 at 17:43
  • i want to save the message id that i have just sent, so i can let the user reply or see all replies on it, what i wanted is to get the mail id, it has just saved with on microsoft servers – Mohamed Samir Aug 29 '19 at 20:50
  • The `id` of a message is mutable so it should not be stored. You should take a look at the new [immutable id](https://learn.microsoft.com/en-us/graph/outlook-immutable-id) that is preview. – Marc LaFleur Aug 30 '19 at 13:32
  • Thanks a lot for you help, i appreciate that – Mohamed Samir Aug 30 '19 at 23:46