| name | exchange-online-admin |
| description | Use when managing Exchange Online. Covers mailbox provisioning, shared/room mailboxes, mail flow rules, transport policies, anti-spam/phishing configuration, DLP policies, retention policies, and quarantine management. |
| user-invocable | true |
| disable-model-invocation | true |
| context | fork |
| allowed-tools | ["Read","Write","Bash"] |
| argument-hint | email admin action (e.g., create shared mailbox, configure mail flow rule) |
| hooks | {"PreToolUse":[{"matcher":"Bash","hooks":"[Truncated]"}]} |
Exchange Online Administration
Overview
Exchange Online mailbox management, mail flow rules, anti-spam/phishing, DLP, and retention policies using Microsoft Graph API and Exchange Online PowerShell.
Mailbox Management
Create Shared Mailbox
Connect-ExchangeOnline
# Create shared mailbox
New-Mailbox -Shared -Name "Support Team" -DisplayName "Support Team" `
-Alias "support" -PrimarySmtpAddress "support@contoso.com"
# Grant full access
Add-MailboxPermission -Identity "support@contoso.com" `
-User "admin@contoso.com" -AccessRights FullAccess -AutoMapping $true
# Grant send-as permission
Add-RecipientPermission -Identity "support@contoso.com" `
-Trustee "admin@contoso.com" -AccessRights SendAs -Confirm:$false
Create Room Mailbox
New-Mailbox -Room -Name "Board Room" -DisplayName "Board Room - Floor 3" `
-Alias "boardroom" -PrimarySmtpAddress "boardroom@contoso.com"
# Configure room settings
Set-CalendarProcessing -Identity "boardroom@contoso.com" `
-AutomateProcessing AutoAccept `
-AddOrganizerToSubject $true `
-DeleteComments $false `
-DeleteSubject $false `
-AllowConflicts $false `
-BookingWindowInDays 180 `
-MaximumDurationInMinutes 480
Mailbox via Graph API
curl -s https://graph.microsoft.com/v1.0/users/user@contoso.com/mailboxSettings \
-H "Authorization: Bearer $ACCESS_TOKEN"
curl -X PATCH https://graph.microsoft.com/v1.0/users/user@contoso.com/mailboxSettings \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"automaticRepliesSetting": {
"status": "scheduled",
"scheduledStartDateTime": {
"dateTime": "2026-03-10T08:00:00",
"timeZone": "UTC"
},
"scheduledEndDateTime": {
"dateTime": "2026-03-15T17:00:00",
"timeZone": "UTC"
},
"internalReplyMessage": "I am currently out of office.",
"externalReplyMessage": "I am out of office. For urgent matters, contact support@contoso.com."
}
}'
Mail Flow Rules
Disclaimer / Email Footer
New-TransportRule -Name "Company Disclaimer" `
-FromScope InOrganization `
-ApplyHtmlDisclaimerLocation Append `
-ApplyHtmlDisclaimerText @"
<div style="font-size:11px;color:#666;">
<p>CONFIDENTIAL: This email is intended only for the named recipient(s).
If received in error, please notify the sender and delete immediately.</p>
</div>
"@ `
-ApplyHtmlDisclaimerFallbackAction Wrap