Search Microsoft 365
search_querySearch Microsoft 365 mail, files, sites, and chats by query. Returns relevance-ranked hits with summaries, URLs, and metadata to locate resources without manual browsing.
Instructions
Runs a relevance-ranked Microsoft Search query across Microsoft 365 and returns a flattened list of hits, each with its rank, a text summary and the resource's id, name or subject, web URL and last-modified time. Defaults to 10 hits per entity-type group over ['message','driveItem']; page with from. Traps: chatMessage cannot be combined with other entity types, so a mixed request is split into two calls and merged, and its hits ignore fields; searching driveItem, listItem or site needs Sites.Read.All, event needs Calendars.Read and chatMessage needs Chat.Read, so enable the matching tool group or the split for that type fails on its own while the rest still return; results are ranked, not sorted by date, and freshly changed items may not be indexed yet. This is read-only despite using POST.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | No | Zero-based offset of the first hit to return; use it to page. Defaults to 0. | |
| size | No | Maximum hits to return per entity-type group. Defaults to 10, capped at 25. | |
| query | Yes | The search terms, in Microsoft Search KQL. Free text works ("quarterly budget"), as do property restrictions such as "subject:budget", "from:sara@contoso.com", "filetype:pptx" and "lastModifiedTime>=2026-01-01", combined with AND/OR/NOT. | |
| fields | No | Extra resource properties to retrieve and include on each hit, for example ["from","importance"] or a SharePoint managed property. Ignored for chatMessage, which does not support field selection. | |
| entityTypes | No | Which kinds of content to search. Defaults to ['message','driveItem'] (Outlook mail plus OneDrive/SharePoint files). |