I'm working with mailbox messages using Graph API. How to classify the messages as sent or received?
I found the similar query,Is there a way to differentiate an inbound (received) versus outbound (sent) email/message?
Thank you
I'm working with mailbox messages using Graph API. How to classify the messages as sent or received?
I found the similar query,Is there a way to differentiate an inbound (received) versus outbound (sent) email/message?
Thank you
Can you try the below queries and see if this helps your scenario:
To identify sent message - https://graph.microsoft.com/v1.0/me/messages?$filter=sender/emailAddress/address eq 'your mail address'
To identify received message - https://graph.microsoft.com/v1.0/me/messages?$filter=sender/emailAddress/address ne 'your email address'
You can try the following steps and see if this helps your scenario:
Get the mail folder collection directly under the root folder of the signed-in user. The returned collection includes any mail search folders directly under the root.
GET /me/mailFolders
Get messages in a specific folder in the user's mailbox - Use list messages endpoint for this.
GET /me/mailFolders/{id}/messages