Search code examples
microsoft-graph-apioutlook-restapi

Using Office 365 Graph API, how to search in sent mails


We need to search mails in Sent Mail folder. Currently it is searching in Inbox alone. What is the call we need to use for searching mail in all folder or the Sent Mail folder?


Solution

  • Graph API gives support to the outlook api. If you are interested in Graph API then try this.

    GET /me/mailFolders('SentItems')/messages?$select=sender,subject
    

    You can use well-known folder names such as Inbox, Drafts, SentItems, or DeletedItems to identify certain mail folders that exist by default for all users.