find-contact
CommandResolve a 3CX contact or extension by email, extension, or name
Show Microsoft 365 license inventory - available SKUs, consumed seats, and optimization opportunities
$ npx -y skills add wyre-ai/msp-claude-plugins --agent claude-code
description: Show Microsoft 365 license inventory - available SKUs, consumed seats, and optimization opportunities argument-hint: "[view] [sku]" arguments: [view, sku]
Show the current Microsoft 365 license inventory for the tenant, including seat utilization and optimization opportunities.
The Conduit `m365` connector has no user, licence or MFA tools, so this command runs on the `cipp` and `microsoft-graph` connectors. The Graph requests further down show what each step reads; through Conduit, send a read as `microsoft_graph_get` with that path as `relativeUrl` (call `microsoft_graph_suggest_queries` first if unsure of the query), and perform writes through the CIPP tool named for that step.
| Step | Tool | Tier | |------|------|------| | Licence assignments and usage | `cipp_list_licenses` (`tenantFilter`) | read | | CSP subscriptions | `cipp_list_csp_licenses` | read | | Disabled or inactive users still holding seats | `cipp_list_users`, then `signInActivity` from the Graph users query in step 2 (`microsoft_graph_get`) for the 90-day check. Sign-in logs keep only about 30 days, so they cannot show 90 days of inactivity; treat a user with no `signInActivity` as unknown, not inactive. Combine the Graph data with CIPP's only after the tenant ID from `microsoft_graph_get` on `/v1.0/organization` matches the CIPP tenant; otherwise report it separately or leave it out | read / admin | | Remove all of a user's licences | `cipp_offboard_user` with `RemoveLicenses: true` only. This removes **every** assigned licence and also takes the user out of any group that assigns a licence, even with `RemoveGroups` off, which can remove access those groups grant. List those groups and confirm the scope before queuing it | admin | | Change one SKU | `cipp_edit_user` with `licenses` set to the **complete** list of SKUs the user should keep (CIPP adds missing SKUs and removes the rest) | admin |
1. **Get all subscribed SKUs**
GET /v1.0/subscribedSkus?$select=skuPartNumber,skuId,consumedUnits,prepaidUnits,capabilityStatus
2. **For `--view users` or `--view unused`**: also fetch all users with licenses
GET /v1.0/users?$select=id,displayName,userPrincipalName,accountEnabled,assignedLicenses,signInActivity&$top=999
3. **Calculate seat availability** per SKU: `prepaidUnits.enabled - consumedUnits`
4. **Identify optimization opportunities**:
Microsoft 365 License Inventory — contoso.com As of: 2024-01-15 SKU Purchased Used Available Status ───────────────────────────────────────────────────────────────────── Microsoft 365 Business Premium 50 46 4 ✅ OK Entra ID P1 25 22 3 ✅ OK Microsoft 365 F1 (Frontline) 10 8 2 ✅ OK Power BI Pro 15 15 0 ⚠️ FULL Total monthly spend estimate: ~$1,840/mo Optimization Opportunities: ⚠️ 3 disabled users still have M365 Business Premium (3 seats × $22/mo = $66/mo recoverable) ⚠️ Power BI Pro is at capacity — consider adding seats or auditing need 💡 5 users inactive 90+ days — review for downgrade or removal
License Reclaim Candidates — M365 Business Premium Disabled accounts with licenses (immediate reclaim): ❌ jold@contoso.com Disabled 2023-11-01 M365 Business Premium ❌ ftemp@contoso.com Disabled 2023-12-15 M365 Business Premium ❌ test.user@contoso.com Disabled 2024-01-01 M365 Business Premium → 3 licenses recoverable immediately Inactive active accounts (last sign-in >90 days): 🕐 msmith@contoso.com Last login: 2023-09-10 M365 Business Premium 🕐 jdoe@contoso.com Last login: 2023-08-22 M365 Business Premium → 2 accounts to review — confirm with customer before removal Estimated monthly saving if all reclaimed: $110/mo (5 seats × $22)
User License Assignments Active Users: ✅ alice@contoso.com M365 Business Premium ✅ bob@contoso.com M365 Business Premium, Power BI Pro ✅ charlie@contoso.com M365 F1 (Frontline) ... Disabled Users (with licenses): ❌ jold@contoso.com M365 Business Premium ← reclaim candidate
No licenses found in this tenant. This may indicate a trial-only or CSP-managed tenant where licenses are managed at the partner level.
Error: Directory.Read.All permission required to list SKUs. User-level permissions insufficient — admin consent needed.
One command to supercharge Claude Code for MSP workflows. Then restart Claude Code. That's it. Documentation: mcp.wyre.ai
Resolve a 3CX contact or extension by email, extension, or name
Snapshot of 3CX queue staffing and active call load
Review and triage abuse mailbox cases in Abnormal Security
Search for specific threat patterns in Abnormal Security by sender, recipient, attack type, or keywords
Triage recent email threats detected by Abnormal Security by severity and attack type
Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.