Administers Microsoft 365/Office 365 tenants as a Global Administrator: bulk user provisioning via CSV, license assignment, conditional access/MFA policies, security audits, and offboarding scripts using Microsoft Graph PowerShell.
Ships in 10-platform. 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.
不该用的边界:
按场景选一条工作流,全程遵循「先 report-only / -WhatIf,后强制执行」。
A. 新租户初始化
try/catch,强制下次登录改密。B. 安全加固
enabledForReportingButNotEnforced(仅报告)。State = "enabled"。C. 用户离职
-WhatIf / 干跑打印将被移除的许可证。前置安装模块(仅当前用户):
Install-Module Microsoft.Graph -Scope CurrentUser
Install-Module ExchangeOnlineManagement -Scope CurrentUser
Install-Module MicrosoftTeams -Scope CurrentUser
连接并跑安全审计(按需申请最小 Scope):
Connect-MgGraph -Scopes "Directory.Read.All","Policy.Read.All","AuditLog.Read.All","Reports.Read.All"
Get-MgSubscribedSku | Select-Object SkuPartNumber, ConsumedUnits, @{N="Total";E={$_.PrepaidUnits.Enabled}}
Get-MgIdentityConditionalAccessPolicy | Select-Object DisplayName, State | Export-Csv .\ca_policies.csv -NoTypeInformation
Get-MgReportAuthenticationMethodUserRegistrationDetail |
Where-Object { -not $_.IsMfaRegistered } |
Select-Object UserPrincipalName, IsMfaRegistered | Export-Csv .\no_mfa_users.csv -NoTypeInformation
安全基线(阻断旧版认证 + 开统一审计):
$policy = @{
DisplayName = "Block Legacy Authentication"
State = "enabled"
Conditions = @{ ClientAppTypes = @("exchangeActiveSync","other") }
GrantControls = @{ Operator = "OR"; BuiltInControls = @("block") }
}
New-MgIdentityConditionalAccessPolicy -BodyParameter $policy
Set-AdminAuditLogConfig -UnifiedAuditLogIngestionEnabled $true
MFA 条件访问策略(务必先 report-only):
$policy = @{
DisplayName = "Require MFA All Users"
State = "enabledForReportingButNotEnforced" # 观察 48h 后再改 enabled
Conditions = @{ Users = @{ IncludeUsers = @("All") } }
GrantControls = @{ Operator = "OR"; BuiltInControls = @("mfa") }
}
New-MgIdentityConditionalAccessPolicy -BodyParameter $policy
从 CSV 批量发证建号(CSV 列:DisplayName, UserPrincipalName, Department, LicenseSku):
$licenseSku = (Get-MgSubscribedSku | Where-Object { $_.SkuPartNumber -eq "ENTERPRISEPACK" }).SkuId
Import-Csv .\employees.csv | ForEach-Object {
try {
$pwd = @{ Password = (New-Guid).ToString().Substring(0,12)+"!"; ForceChangePasswordNextSignIn = $true }
$user = New-MgUser -DisplayName $_.DisplayName -UserPrincipalName $_.UserPrincipalName `
-AccountEnabled -PasswordProfile $pwd
Set-MgUserLicense -UserId $user.Id -AddLicenses @(@{ SkuId = $licenseSku }) -RemoveLicenses @()
Write-Host "Provisioned: $($_.UserPrincipalName)"
} catch { Write-Warning "Failed $($_.UserPrincipalName): $_" }
}
离职处置(封禁 → 吊销 → 干跑 → 执行):
$upn = "[email protected]"
$user = Get-MgUser -Filter "userPrincipalName eq '$upn'"
Update-MgUser -UserId $user.Id -AccountEnabled:$false # 立即封禁登录
Invoke-MgInvalidateAllUserRefreshToken -UserId $user.Id # 吊销全部会话
$licenses = (Get-MgUserLicenseDetail -UserId $user.Id).SkuId
$licenses | ForEach-Object { Write-Host "[WhatIf] Would remove SKU: $_" } # 干跑预览
Set-MgUserLicense -UserId $user.Id -AddLicenses @() -RemoveLicenses $licenses
Set-Mailbox -Identity $upn -Type Shared # 需 ExchangeOnlineManagement
Get-MgUserMemberOf -UserId $user.Id | ForEach-Object {
try { Remove-MgGroupMemberByRef -GroupId $_.Id -DirectoryObjectId $user.Id } catch {}
}
Get-Credential;按最小权限申请 Graph Scope。enabledForReportingButNotEnforced,观察 48 小时登录日志再切 enabled,否则可能把管理员锁在门外。-WhatIf 或干跑打印;批量逻辑包 try/catch,用 Write-Host / Write-Warning 留审计痕迹。Microsoft.Graph 模块),勿用已弃用的 MSOnline / AzureAD。本条采编自 alirezarezvani/claude-skills(MIT)。
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/10-platform:ms365-tenant-adminfrom 10-platform
npx claudepluginhub findscripter/everything-skills --plugin 10-platform66 skills in this plugin
/agentmail-email-infra当 AI 智能体需要真实邮箱完成注册/验证码/事务通信时使用;通过 AgentMail REST API 开通账号、收发邮件、注册 Webhook、查询 karma 余额并产出可执行调用;不适用于自建/企业 SMTP/IMAP 或个人邮箱代收。触发词:AgentMail、智能体邮箱、theagentmail.net/agentphone-voice-sms-agents当需要给 AI 代理配备电话号码、发起/接听语音通话、收发短信、查看通话转写或配置 Webhook 时使用;调用 AgentPhone REST API(base=https://api.agentphone.to/v1)完成代理/号码/通话/短信/Webhook/用量的全生命周期管理,产出可直接执行的 curl 与 Webhook 处理代码;不适用于自建 Twilio/SIP/STUN 等底层电信栈或非 AgentPhone 平台。触发词:电话代理、语音通话、短信、号码、Webhook、转写。/ai-native-cli-design当设计/改造供 AI 智能体调用的命令行工具时使用;按 core/recommended/ecosystem 三层产出 JSON 优先、可校验的 CLI 契约(默认 JSON、结构化错误、退出码、护栏、agent/ 目录与自描述);不适用于纯人类交互 CLI、GUI 或库 API 设计;触发词:agent CLI、AI 友好命令行、CLI JSON 输出、退出码规范、agent/ 目录Other plugins' skills for the same job