microsoft-outlooklisted
Install: claude install-skill AceDataCloud/Skills
Drive Microsoft Graph for Outlook / Microsoft 365 — both **mail** and
**calendar** — via `curl + jq`. The user's OAuth bearer token is in
`$MICROSOFT_OUTLOOK_TOKEN`; every call needs it as
`Authorization: Bearer $MICROSOFT_OUTLOOK_TOKEN`. The token already
carries the scopes the user agreed to at install: any of `Mail.Read`,
`Mail.ReadWrite`, `Mail.Send`, `MailboxSettings.Read`,
`MailboxSettings.ReadWrite`, `Calendars.Read`, `Calendars.ReadWrite`,
plus `*.Shared` variants. Mail and calendar are unified into one
connector (and one OAuth grant) because Microsoft Graph treats them as
sibling features of the same mailbox — there is no value in splitting
them at the skill layer.
The Graph API returns JSON; failures surface as
`{"error": {"code": "...", "message": "..."}}` — show that error
verbatim to the user.
**Always start with `/me`** to confirm the connection works AND learn
which mailbox you're operating against. For calendar work, also fetch
`mailboxSettings.timeZone` so dates render right.
---
# Mail — Recipes
### Verify auth (always run first)
```sh
curl -sS -H "Authorization: Bearer $MICROSOFT_OUTLOOK_TOKEN" \
https://graph.microsoft.com/v1.0/me \
| jq '{displayName, mail, userPrincipalName}'
```
### List recent messages
```sh
curl -sS -H "Authorization: Bearer $MICROSOFT_OUTLOOK_TOKEN" \
"https://graph.microsoft.com/v1.0/me/messages?\$top=10&\$select=id,subject,from,receivedDateTime,isRead,hasAttachments&\$orderby=receivedDateTime desc" \
| jq '.value[]