/get-user
Look up a Microsoft 365 user by name or email, showing account status, licenses, MFA, and last sign-in
$ npx -y skills add wyre-technology/msp-claude-plugins --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/get-user
Context preview
What this command does when you run it.
Look up a Microsoft 365 user by name or email, showing account status, licenses, MFA, and last sign-in
Command definition
get-user.mddescription: Look up a Microsoft 365 user by name or email, showing account status, licenses, MFA, and last sign-in
argument-hint: "<query>"
arguments: [query]
Get M365 User
Look up a Microsoft 365 user and return a comprehensive summary of their account state.
Arguments
- `query` (required) — User's email address (UPN), display name, or partial name
Prerequisites
- M365 connected via gateway or direct Entra app credentials
- `User.Read.All` and `UserAuthenticationMethod.Read.All` permissions
Steps
1. **Resolve the user**
- If `query` contains `@`, treat as UPN: `GET /v1.0/users/{query}`
- Otherwise search by display name: `GET /v1.0/users?$filter=startsWith(displayName,'{query}')`
- If multiple matches, list them and ask which one
2. **Fetch user details**
GET /v1.0/users/{id}?$select=id,displayName,userPrincipalName,accountEnabled,jobTitle,department,usageLocation,assignedLicenses,signInActivity,createdDateTime3. **Check MFA enrollment**
GET /v1.0/users/{id}/authentication/methods4. **Resolve license names**
- Get `subscribedSkus` to map GUID → friendly name
- Or use the common SKU table in the licensing skill
5. **Format and return summary**
Output
User: Jane Smith (jsmith@contoso.com)
Status: ✅ Active
Created: 2022-03-15
Last Login: 2024-01-14 09:23 UTC (1 day ago)
Role: IT Coordinator
Department: Operations
Licenses:
✅ Microsoft 365 Business Premium
MFA:
✅ Microsoft Authenticator (iPhone) — registered 2022-03-15
✅ FIDO2 Key — registered 2023-11-01
Groups: 3 groups (use /list-teams to see Teams)
**Disabled user example:**
User: John Old (jold@contoso.com)
Status: ❌ DISABLED
Last Login: 2023-10-01 14:05 UTC (105 days ago)
Licenses:
⚠️ M365 Business Premium — license still assigned (consider reclaiming)
**No MFA example:**
MFA:
❌ No MFA registered — password only (HIGH RISK)
Recommend: Enroll in Microsoft Authenticator or FIDO2 key
Error Handling
User Not Found
User not found: "Janet Smith"
Did you mean:
- Jane Smith (jsmith@contoso.com) — Active
- James Smith (jsm@contoso.com) — Active
Permission Denied for MFA
MFA status: Unable to retrieve (UserAuthenticationMethod.Read.All permission required)
Account and license details shown above are accurate.
Related Commands
- `/check-mfa-status` — Audit MFA across all users
- `/list-licenses` — Full license inventory
- `/offboard-user` — Offboarding workflow for this user
Read more
description: Look up a Microsoft 365 user by name or email, showing account status, licenses, MFA, and last sign-in argument-hint: "<query>" arguments: [query]
Get M365 User
Look up a Microsoft 365 user and return a comprehensive summary of their account state.
Arguments
- `query` (required) — User's email address (UPN), display name, or partial name
Prerequisites
- M365 connected via gateway or direct Entra app credentials
- `User.Read.All` and `UserAuthenticationMethod.Read.All` permissions
Steps
1. **Resolve the user**
- If `query` contains `@`, treat as UPN: `GET /v1.0/users/{query}`
- Otherwise search by display name: `GET /v1.0/users?$filter=startsWith(displayName,'{query}')`
- If multiple matches, list them and ask which one
2. **Fetch user details**
GET /v1.0/users/{id}?$select=id,displayName,userPrincipalName,accountEnabled,jobTitle,department,usageLocation,assignedLicenses,signInActivity,createdDateTime3. **Check MFA enrollment**
GET /v1.0/users/{id}/authentication/methods4. **Resolve license names**
- Get `subscribedSkus` to map GUID → friendly name
- Or use the common SKU table in the licensing skill
5. **Format and return summary**
Output
User: Jane Smith (jsmith@contoso.com) Status: ✅ Active Created: 2022-03-15 Last Login: 2024-01-14 09:23 UTC (1 day ago) Role: IT Coordinator Department: Operations Licenses: ✅ Microsoft 365 Business Premium MFA: ✅ Microsoft Authenticator (iPhone) — registered 2022-03-15 ✅ FIDO2 Key — registered 2023-11-01 Groups: 3 groups (use /list-teams to see Teams)
**Disabled user example:**
User: John Old (jold@contoso.com) Status: ❌ DISABLED Last Login: 2023-10-01 14:05 UTC (105 days ago) Licenses: ⚠️ M365 Business Premium — license still assigned (consider reclaiming)
**No MFA example:**
MFA: ❌ No MFA registered — password only (HIGH RISK) Recommend: Enroll in Microsoft Authenticator or FIDO2 key
Error Handling
User Not Found
User not found: "Janet Smith" Did you mean: - Jane Smith (jsmith@contoso.com) — Active - James Smith (jsm@contoso.com) — Active
Permission Denied for MFA
MFA status: Unable to retrieve (UserAuthenticationMethod.Read.All permission required) Account and license details shown above are accurate.
Related Commands
- `/check-mfa-status` — Audit MFA across all users
- `/list-licenses` — Full license inventory
- `/offboard-user` — Offboarding workflow for this user
One command to supercharge Claude Code for MSP workflows. Then restart Claude Code. That's it. Documentation: mcp.wyre.ai
Repo: wyre-technology/msp-claude-plugins
Other commands on msp-claude-plugins.
- /case-review
Review and triage abuse mailbox cases in Abnormal Security
Open command - /search-threats
Search for specific threat patterns in Abnormal Security by sender, recipient, attack type, or keywords
Open command - /threat-triage
Triage recent email threats detected by Abnormal Security by severity and attack type
Open command - /list-overdue-invoices
List open and overdue Alternative Payments invoices and optionally generate hosted payment links for them
Open command - /reconcile-payout
Reconcile an Alternative Payments payout by listing its transactions and matching them against invoices and customers
Open command - /eol-report
EOL/EOS risk report — devices, OS versions, and firmware approaching or past end-of-life/end-of-support, prioritized by criticality
Open command

