Search code examples
microsoft-graph-apioutlook-restapi

How to read my messages from Inbox or sent items from a specific email address and within a particular interval?


i am working in graph explorer API to read the email of my account. the idea is to pass an email address and a date interval to Graph API and it should return me the same Messages Associated with this email.it could be from sent item and inbox can be both. i am useing below api:

https://graph.microsoft.com/v1.0/me/messages?$Search="Aj****@t**maxa****icas.com
and Sent >= 2018-05-09"

but this is giving Messages from my inbox not from sent Email.Can any 1 help me out. Thanks.


Solution

  • https://graph.microsoft.com/v1.0/me/mailFolders/SentItems/messages$search="Received>=2018-05-16T11:55:01 AND Participants:A***@tr*****c**as.com"&$top=10 
    

    This works fine for me.

    you can pass the yyyy-mm-dd format also in the Revived date.