Outlook Mail (Microsoft Graph)
Lets an agent work the signed-in user's Microsoft 365 / Outlook mailbox through Microsoft Graph v1.0: search and read messages and folders, draft or send replies and forwards, send new mail, flag, categorize, mark read and move messages. Based on the Microsoft Graph API specification.
Connect this API to an AI agent Browse all specs
What you can do with Outlook Mail (Microsoft Graph) via MCP
Every endpoint below becomes a governed tool your AI agent (Claude, ChatGPT, or a customer-facing VX agent) can call — with scoped permissions, sandbox testing, and audit logs.
| Method | Path | Operation | Description |
|---|---|---|---|
| GET | /me |
getMe | Get the signed-in user's name and email address |
| GET | /me/mailFolders |
listMailFolders | List mail folders (Inbox, Sent Items, custom folders) with ids |
| GET | /me/mailFolders/{mailFolder-id}/messages |
listFolderMessages | List or search messages in one folder (e.g. inbox) |
| GET | /me/messages |
listMessages | Search or filter messages across the whole mailbox |
| GET | /me/messages/{message-id} |
getMessage | Read one message (sender, recipients, body) |
| PATCH | /me/messages/{message-id} |
updateMessage | Mark read/unread, flag, set categories, or edit a draft |
| POST | /me/messages/{message-id}/microsoft.graph.move |
moveMessage | Move a message to another folder (e.g. archive) |
| POST | /me/messages/{message-id}/microsoft.graph.createReply |
createReplyDraft | Create a reply draft for a message (not sent) |
| POST | /me/messages/{message-id}/microsoft.graph.createReplyAll |
createReplyAllDraft | Create a reply-all draft for a message (not sent) |
| POST | /me/messages/{message-id}/microsoft.graph.createForward |
createForwardDraft | Create a forward draft for a message (not sent) |
| POST | /me/messages/{message-id}/microsoft.graph.send |
sendDraft | Send an existing draft message |
| POST | /me/messages/{message-id}/microsoft.graph.reply |
replyToMessage | Reply to the sender immediately |
| POST | /me/messages/{message-id}/microsoft.graph.replyAll |
replyAllToMessage | Reply to all recipients immediately |
| POST | /me/messages/{message-id}/microsoft.graph.forward |
forwardMessage | Forward a message to new recipients immediately |
| POST | /me/microsoft.graph.sendMail |
sendMail | Send a new email immediately |
Authentication
microsoftOAuth
OAuth 2.0
Scopes: User.Read Mail.Read Mail.ReadWrite Mail.Send offline_access
Microsoft identity platform OAuth 2.0 (authorization code, delegated permissions for the signed-in user).
How to get a credential
- In the Microsoft Entra admin center go to App registrations > New registration; choose the supported account types (single tenant for your organization, or multitenant + personal accounts).
- Under Authentication, add a Web platform with the VX Agents redirect URI shown in the credential form.
- Under Certificates & secrets, create a client secret and copy its value.
- Under API permissions, add Microsoft Graph delegated permissions
Mail.Read,Mail.ReadWrite,Mail.Send,User.Readandoffline_access. Grant admin consent if your tenant requires it. - Paste the application (client) ID and secret into the VX Agents credential and sign in with the mailbox owner's account.
Permissions used
| Scope | Operations |
|---|---|
User.Read |
getMe |
Mail.Read |
listMailFolders, listFolderMessages, listMessages, getMessage |
Mail.ReadWrite |
updateMessage, moveMessage, createReplyDraft, createReplyAllDraft, createForwardDraft |
Mail.Send |
sendMail, sendDraft, replyToMessage, replyAllToMessage, forwardMessage |
offline_access |
refresh tokens so the connection stays signed in |
Common errors
- 401 Unauthorized (
InvalidAuthenticationToken): the token expired or is for the wrong resource. Reconnect the credential; make sureoffline_accessis granted. - 403 Forbidden (
ErrorAccessDenied): a permission is missing or admin consent was not granted. Add it in API permissions and reconnect. - 400 Bad Request: invalid
$filter/$searchsyntax (they cannot be combined with$orderbyon most fields) or a malformed recipient. - 429 Too Many Requests: mailbox throttling. Wait for the
Retry-Afterseconds and retry.
Store the connection as a VX Agents OAuth credential. Never paste tokens into chat.
Usage guide
Setup
- Connect a Microsoft OAuth credential (delegated) with
Mail.Read,Mail.ReadWrite,Mail.Send,User.Readandoffline_access. The agent works in the signed-in user's own mailbox only. - Call
getMeonce to learn the user's address. Well-known folder ids work anywhere a folder id is asked:inbox,sentitems,drafts,archive,deleteditems,junkemail.
Triage and reply to email
- Find mail:
listFolderMessageswithmailFolder-id=inbox,$filter=isRead eq false,$orderby=receivedDateTime desc,$top=25,$select=id,subject,from,receivedDateTime,bodyPreview,conversationId. For free text uselistMessageswith$search="invoice 1042"(no$orderbywith$search). getMessageto read the full body; to read a whole thread,listMessageswith$filter=conversationId eq '<id>'.- Write the answer with
createReplyDraft/createReplyAllDraft(put the text incomment), orcreateForwardDraftwithtoRecipients. Adjust the draft withupdateMessageif needed. Show the draft to the user. - After the user confirms,
sendDraftwith the draft id.replyToMessage,replyAllToMessage,forwardMessageandsendMailsend immediately: use them only when the user has approved the exact text and recipients. - Tidy up:
updateMessagewithisRead: true,flag: {flagStatus: "flagged"}orcategories;moveMessagewithdestinationId: "archive".
Good to know
- Sending mail cannot be undone: always confirm recipients, subject and body first.
- Paging: follow
@odata.nextLink(it already contains$skip/$skiptoken).$topmax is 1000; keep it small and use$selectto save tokens. - Times are ISO 8601 UTC, e.g.
receivedDateTime ge 2026-10-01T00:00:00Z. moveMessagereturns the message with a new id; use that id afterwards.body.contentTypeishtmlby default; sendtextfor plain replies.- No delete operations by design: archive instead.
How to use this spec
- Create a free VX Agents account (sandbox tools included).
- Open the marketplace and connect “Outlook Mail (Microsoft Graph)” to an agent.
- Expose it as an MCP server for Claude/ChatGPT, or chat with it directly.