/m365:securityfrom m365
Audits M365 tenant security posture: MFA enrollment, sign-in risk, conditional access, legacy auth, inbox rules, Secure Score, and compromise indicators. Use for tenant security reviews or account compromise investigations.
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.
The Conduit m365 connector (hidden, personal-only) has no tools for this area. Through Conduit, reads go to the microsoft-graph connector as microsoft_graph_get (admin tier, read-only; use microsoft_graph_suggest_queries to build the query) and fleet operations go to the cipp connector:
cipp_list_mfa_users; Conditional Access: cipp_list_conditional_access_policies, cipp_list_named_locationscipp_list_user_signin_logs, cipp_list_audit_logscipp_bec_check (admin tier, read-only); response: cipp_revoke_sessions, cipp_reset_password, cipp_reset_mfa, cipp_disable_user (all admin-tier writes in Conduit, so the caller needs admin access to the cipp connector)cipp_get_secure_score, cipp_list_secure_score_controlsSecurity checks are among the most high-value tasks an MSP can perform in a customer's M365 tenant. Account compromises, inadequate MFA coverage, and misconfigured mail rules are the leading causes of M365 security incidents. This skill covers the key checks and indicators that separate a secure tenant from a vulnerable one.
"Security" is the most overloaded word in the MSP stack. This skill is identity posture inside one M365 tenant, read via Graph:
huntress, sentinelone, blackpoint, or blumira.cipp (cipp-standards) or inforcer
(inforcer-baseline-alignment).cipp
(cipp-security). One tenant at a time is what this skill does.mimecast, abnormal,
ironscales, or the email-security pack.compliance-pack.MFA enrollment lives on the authentication/methods endpoint per user. Users with only a passwordAuthenticationMethod entry have no MFA.
GET /v1.0/users/{userId}/authentication/methods
Response — user WITH MFA:
{
"value": [
{
"@odata.type": "#microsoft.graph.microsoftAuthenticatorAuthenticationMethod",
"id": "aad-method-id",
"displayName": "iPhone",
"createdDateTime": "2023-06-01T10:00:00Z"
},
{
"@odata.type": "#microsoft.graph.passwordAuthenticationMethod"
}
]
}
Response — user WITHOUT MFA (vulnerable):
{
"value": [
{
"@odata.type": "#microsoft.graph.passwordAuthenticationMethod"
}
]
}
Use Microsoft Graph Reports for tenant-wide MFA status:
GET /v1.0/reports/authenticationMethods/userRegistrationDetails
Response per user:
{
"id": "user-guid",
"userPrincipalName": "[email protected]",
"isMfaRegistered": true,
"isMfaCapable": true,
"isSsprRegistered": false,
"methodsRegistered": ["microsoftAuthenticator", "softwareOath"]
}
This is the fastest path to a full tenant MFA audit.
| Method | Security Level | Notes |
|---|---|---|
| FIDO2 hardware key | Highest | Phishing-resistant |
| Windows Hello for Business | Highest | Device-bound |
| Microsoft Authenticator (passwordless) | High | Number matching recommended |
| OATH hardware token | High | |
| Microsoft Authenticator (OTP) | Medium | Better than SMS |
| Software OATH (other app) | Medium | |
| SMS/Phone | Low | Susceptible to SIM swap |
| Password only | None | Unacceptable for business |
GET /v1.0/identityProtection/riskyUsers?$filter=riskState eq 'atRisk'&$select=id,userPrincipalName,riskLevel,riskState,riskLastUpdatedDateTime
Risk Levels: low, medium, high
GET /v1.0/auditLogs/signIns?$filter=riskLevelDuringSignIn ne 'none'&$select=userPrincipalName,riskLevelDuringSignIn,location,createdDateTime&$top=50
POST /v1.0/identityProtection/riskyUsers/dismiss
Content-Type: application/json
{
"userIds": ["user-guid"]
}
GET /v1.0/auditLogs/signIns?$filter=userPrincipalName eq '[email protected]'&$select=createdDateTime,userPrincipalName,ipAddress,location,status,clientAppUsed,riskLevelDuringSignIn&$top=20&$orderby=createdDateTime desc
Key fields for incident response:
status.errorCode: 0 = success, nonzero = failureipAddress and location for geolocation anomaliesclientAppUsed — legacy auth clients are high riskconditionalAccessStatus: notApplied = CA policy gapAttackers often create hidden inbox rules to forward mail or hide replies. Check for:
GET /v1.0/users/{userId}/mailFolders/inbox/messageRules
Red flags:
{
"displayName": "hidden rule",
"conditions": { "subjectContains": ["invoice"] },
"actions": { "forwardTo": [{ "emailAddress": { "address": "[email protected]" } }] },
"isEnabled": true
}
Legacy auth protocols (IMAP, POP3, SMTP AUTH, basic auth) bypass MFA. Identify users still using them:
GET /v1.0/auditLogs/signIns?$filter=clientAppUsed eq 'IMAP' or clientAppUsed eq 'POP3' or clientAppUsed eq 'Exchange ActiveSync'&$select=userPrincipalName,clientAppUsed,createdDateTime&$top=100
Recommended: Block legacy auth via Conditional Access policy.
Check if CA policies are configured:
GET /v1.0/identity/conditionalAccess/policies?$select=id,displayName,state,conditions,grantControls
state values: enabled, disabled, enabledForReportingButNotEnforced (report-only)
MSP baseline CA policies to verify exist:
Get the tenant's Microsoft Secure Score:
GET /v1.0/security/secureScores?$top=1
Response:
{
"value": [{
"currentScore": 52.4,
"maxScore": 120.0,
"averageComparativeScores": [
{ "basis": "AllTenants", "averageScore": 38.2 }
]
}]
}
Score improvement recommendations:
GET /v1.0/security/secureScoreControlProfiles?$select=title,maxScore,implementationStatus,controlCategory
When a user reports suspicious activity, check these in order:
| Check | Command | Red Flag |
|---|---|---|
| Recent sign-ins | GET /auditLogs/signIns | Unfamiliar IP, country, time |
| MFA changes | GET /auditLogs/directoryAudits | MFA method added/removed |
| Inbox rules | GET /mailFolders/inbox/messageRules | External forwarding |
| Sent items | GET /messages from Sent folder | Phishing sent from account |
| OAuth apps | GET /oauth2PermissionGrants | Unknown app granted access |
POST /v1.0/users/{id}/revokeSignInSessions| Task | Microsoft Graph Permission |
|---|---|
| MFA registration report | UserAuthenticationMethod.Read.All |
| Authentication methods | UserAuthenticationMethod.Read.All |
| Sign-in logs | AuditLog.Read.All |
| Risky users | IdentityRiskyUser.Read.All (P2) |
| Conditional access | Policy.Read.All |
| Security score | SecurityEvents.Read.All |
| Revoke sessions | Directory.ReadWrite.All |
What SKILL.md sets; muted values are Claude Code's defaults
When reviewing an M365 tenant's security posture or investigating a suspected account compromise. Use when: m365 security, m365 mfa, mfa enrollment, conditional access, risky sign-in, account compromise m365, m365 security audit, suspicious activity m365, m365 security score, entra security, or m365 sign-in logs.
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.
/npx claudepluginhub wyre-ai/msp-claude-plugins --plugin m365Other plugins' skills for the same job