Microsoft Outlook
How to find Outlook messages by criteria
Use Microsoft Graph message search when a script needs a repeatable mailbox query. Use Outlook on the web search filters when a person needs to find the same messages interactively.
Documentation reviewed · 2 methods with sources
Ways to do it
API
Microsoft Graph $search on messages
Search messages by keyword or a property such as subject or sender.
Read source: Use $search Query Parameter in Microsoft Graph APIs- Requirements
- A delegated Microsoft Graph access token with mailbox-read permission for /me. Mail.ReadBasic allows basic message properties, while Mail.Read includes message bodies.
- Limitations
- Microsoft Graph returns at most 1,000 results for a $search request. Use narrower criteria or a different retrieval design when the result set is larger.
Example shell
curl --fail --get -H "Authorization: Bearer $GRAPH_TOKEN" \
--data-urlencode '$search="subject:report"' \
https://graph.microsoft.com/v1.0/me/messagesInterface
Outlook on the web search filters
Enter a term in the Search box and refine it with Folders, From, To, Subject, keywords, date ranges, or attachments.
Read source: Search Mail and People in Outlook on the web- Requirements
- Access to the Outlook mailbox through Outlook on the web.
- Limitations
- Outlook returns only the first 1,000 search results, so broad searches need narrower terms or filters.
Example text
Outlook on the web → Search → Filters → Subject → report