/m365:mailboxesfrom m365
Manages Exchange Online mailboxes via Microsoft Graph: mailbox types, message search, inbox rules, out-of-office, forwarding, quotas, shared mailbox access, and mail flow diagnostics.
Ships in m365. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Microsoft 365 mailboxes are managed through Exchange Online, accessible via Microsoft Graph. For MSPs, mailbox tasks range from diagnosing delivery failures and searching for lost emails to managing shared mailboxes and offboarding users. Graph provides a unified API across all mailbox types.
mimecast, spamtitan,
abnormal, ironscales, or the email-security pack. Come back
here only once you know the message reached the tenant.cipp plugin (cipp-mailboxes).m365-security.backup-pack or kaseya/datto-saas-protection.| Type | Description | Common MSP Tasks |
|---|---|---|
| User Mailbox | Standard licensed user | Search, out-of-office, size, rules |
| Shared Mailbox | Team inbox, no license required | Access management, forwarding |
| Room/Equipment | Calendar resource booking | Availability, booking policies |
| Distribution Group | Email alias to multiple users | Membership, send-as |
GET /v1.0/users/{userId}/messages?$select=id,subject,from,receivedDateTime,isRead&$top=25&$orderby=receivedDateTime desc
GET /v1.0/users/{userId}/messages?$search="subject:invoice 2024"&$select=id,subject,from,receivedDateTime
Also supports KQL search operators:
$search="from:[email protected]" — by sender$search="subject:urgent hasAttachments:true" — combined$search="received>=2024-01-01" — date rangeGET /v1.0/users/{userId}/messages/{messageId}?$select=id,subject,from,body,receivedDateTime,attachments
GET /v1.0/users/{userId}/mailboxSettings
Response:
{
"automaticRepliesSetting": {
"status": "disabled",
"internalReplyMessage": "",
"externalReplyMessage": ""
},
"timeZone": "Eastern Standard Time",
"language": { "locale": "en-US" }
}
PATCH /v1.0/users/{userId}/mailboxSettings
Content-Type: application/json
{
"automaticRepliesSetting": {
"status": "alwaysEnabled",
"internalReplyMessage": "<html>I'm out of office until Jan 15.</html>",
"externalReplyMessage": "<html>I'm out of office. For urgent matters contact [email protected].</html>"
}
}
PATCH /v1.0/users/{userId}/mailboxSettings
Content-Type: application/json
{
"automaticRepliesSetting": { "status": "disabled" }
}
GET /v1.0/users/{userId}/mailFolders/inbox?$select=totalItemCount,sizeInBytes
For full mailbox statistics (requires Exchange admin permissions):
GET /v1.0/reports/getMailboxUsageDetail(period='D7')
GET /v1.0/users/{userId}/mailFolders/inbox/messageRules
Response shows rules that may affect mail delivery:
{
"value": [
{
"id": "rule1",
"displayName": "Move newsletters",
"conditions": { "senderContains": ["newsletter"] },
"actions": { "moveToFolder": "Newsletters" },
"isEnabled": true
}
]
}
POST /v1.0/users/{userId}/sendMail
Content-Type: application/json
{
"message": {
"subject": "Your IT support request has been resolved",
"body": { "contentType": "HTML", "content": "<p>Your ticket #1234 is now closed.</p>" },
"toRecipients": [{ "emailAddress": { "address": "[email protected]" } }]
},
"saveToSentItems": true
}
Shared mailbox access is managed via Microsoft 365 admin or Exchange PowerShell, not directly via Graph mailbox endpoints. Use Graph group membership or delegate access patterns.
Access is represented as mailboxPermissions — check via admin APIs or Exchange PowerShell:
Get-MailboxPermission -Identity "[email protected]" | Where-Object { $_.AccessRights -eq "FullAccess" }
Look for NDRs (Non-Delivery Reports) in the user's inbox or sent items:
GET /v1.0/users/{userId}/messages?$filter=senderEmailAddress/address eq '[email protected]'&$select=subject,receivedDateTime,body
| NDR Code | Meaning | Resolution |
|---|---|---|
5.1.1 | Recipient doesn't exist | Verify UPN / check aliases |
5.1.8 | Sender blocked (spam) | Review anti-spam policy |
5.2.2 | Mailbox full | Check quota, remove items |
5.7.1 | Unauthorized relay | SMTP auth settings |
5.7.606 | Sender IP blocked | Submit to Microsoft for delisting |
Option A: Convert to shared mailbox (no license needed, data accessible)
Option B: Forward and archive
Option C: Auto-reply and close
| Error | Cause | Resolution |
|---|---|---|
MailboxNotEnabledForRESTAPI | User has no Exchange license | Assign Exchange/M365 license |
ErrorItemNotFound | Message ID expired or moved | Search by subject/date instead |
AuthenticationError | Token expired | Re-authenticate via OAuth flow |
TooManyRequests | Graph throttling (429) | Retry with exponential backoff |
Forbidden (403) | Missing Mail.Read permission | Check app registration |
| Task | Microsoft Graph Permission |
|---|---|
| Read emails | Mail.Read or Mail.ReadWrite |
| Send email | Mail.Send |
| Mailbox settings | MailboxSettings.ReadWrite |
| All users' mail (admin) | Mail.Read (delegated + admin consent) |
What SKILL.md sets; muted values are Claude Code's defaults
When reading or searching a user's mail, managing shared mailboxes, or diagnosing an M365 mail delivery or quota problem. Use when: m365 email, m365 mailbox, exchange online, search email m365, shared mailbox, out of office m365, mail flow issue, email quota, forward email m365, or inbox rules m365.
Three short reads, in order
8 skills in this plugin
/api-patternsMicrosoft 365 API PatternsMicrosoft Graph fundamentals shared by every M365 skill: Entra token scopes and the per-request Bearer model, OData query operators and filter syntax, @odata.nextLink pagination, delta queries for incremental sync, 429 throttling and retry behavior, JSON batching, and the common Graph error codes.
/calendarMicrosoft 365 CalendarExchange Online calendars through Microsoft Graph: event retrieval and date-range queries, free/busy and availability lookup, meeting and Teams-meeting creation, room and equipment resource bookings, calendar permissions, and the Graph scopes and error causes involved.
/filesMicrosoft 365 FilesOneDrive personal storage and SharePoint document libraries, both reached through the shared Microsoft Graph `/drives` endpoint: drive and item addressing, sharing permissions, storage quotas, file search, and the offboarding file-transfer workflow.
/licensingMicrosoft 365 LicensingThe M365 subscription → SKU → service-plan model, seat availability versus consumption, assigning and removing licenses through Graph, the audit workflow for finding unused or misallocated seats, common SKU GUIDs, and licensing error causes.
/securityMicrosoft 365 SecurityThe M365 tenant security checks that distinguish a secure tenant from a vulnerable one: per-user authentication-method inspection for real MFA enrollment, sign-in risk and risky users, suspicious inbox rules, legacy authentication exposure, conditional access coverage, Secure Score, and the indicator set for a compromised account.
/teamsMicrosoft 365 TeamsMicrosoft Teams through Microsoft Graph: the Team/Channel/Member/Meeting/Tab object model, team and channel enumeration, membership and ownership changes, online meetings, usage reporting, and the causes behind Teams access failures.
npx claudepluginhub wyre-ai/msp-claude-plugins --plugin m365Other plugins' skills for the same job