/m365:licensingfrom m365
Manages Microsoft 365 licensing via Graph and CIPP: SKU/service-plan model, seat assignment/removal, audit workflows for unused seats, common SKU GUIDs, and error causes.
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_licenses; CSP subscriptions: cipp_list_csp_licensesmicrosoft_graph_get on /v1.0/subscribedSkuscipp_offboard_user with RemoveLicenses: true (admin tier). It removes every licence and the user's licence-assigning group memberships, and it only queues a job: check the user's licences afterwards before reporting successcipp_edit_user (admin tier) with licenses set to the complete list of SKU IDs the user should hold; CIPP adds missing SKUs and removes any others, so include every SKU the user keepsmicrosoft_graph_get is read-only); do it in the Microsoft 365 admin centerM365 licensing is a top billing concern for MSPs. Licenses are purchased as SKU subscriptions, each containing bundles of service plans (Exchange, Teams, SharePoint, etc.). Efficient license management — finding unused seats, rightsizing SKUs, ensuring all users have what they need — directly impacts both the MSP's margin and the customer's costs.
Assigning a seat and buying a seat are different systems, and the word "license" covers both:
subscribedSkus only reports what was already purchased. Use pax8
(pax8-subscriptions), sherweb, or cipp for CSP licences.pax8 (pax8-invoices) or the finance-pack.cipp
plugin (cipp-licenses).$filter;
use the microsoft-graph plugin's microsoft-graph-querying skill.M365 Business Premium (subscription)
└── GUID: cbdc14ab-d96c-4c30-b9f4-6ada7cdc1d46
├── Exchange Online (service plan)
├── Microsoft Teams (service plan)
├── SharePoint Online (service plan)
├── Intune (service plan)
└── Entra ID P1 (service plan)
| State | Meaning |
|---|---|
Enabled | Service plan is active and usable |
Disabled | Plan is turned off for this user (license still assigned) |
Error | Assignment failed — usually missing usageLocation |
LockedOut | Tenant billing issue |
PendingInput | Waiting for additional configuration |
GET /v1.0/subscribedSkus?$select=skuPartNumber,skuId,consumedUnits,prepaidUnits,servicePlans
Response:
{
"value": [
{
"skuPartNumber": "SPE_E3",
"skuId": "05e9a617-0261-4cee-bb44-138d3ef5d965",
"consumedUnits": 42,
"prepaidUnits": {
"enabled": 50,
"suspended": 0,
"warning": 0
},
"servicePlans": [...]
}
]
}
Available seats = prepaidUnits.enabled - consumedUnits
GET /v1.0/users?$select=id,displayName,userPrincipalName,accountEnabled,assignedLicenses,usageLocation&$top=999
Filter by SKU GUID:
GET /v1.0/users?$filter=assignedLicenses/any(x:x/skuId eq cbdc14ab-d96c-4c30-b9f4-6ada7cdc1d46)&$select=id,displayName,userPrincipalName,accountEnabled
GET /v1.0/users?$filter=assignedLicenses/$count eq 0&$count=true&$select=id,displayName,userPrincipalName,accountEnabled
Requires
ConsistencyLevel: eventualheader and$count=true
POST /v1.0/users/{userId}/assignLicense
Content-Type: application/json
{
"addLicenses": [
{
"skuId": "cbdc14ab-d96c-4c30-b9f4-6ada7cdc1d46",
"disabledPlans": []
}
],
"removeLicenses": []
}
usageLocationmust be set on the user before assigning. UsePATCH /v1.0/users/{id}with"usageLocation": "US"first.
POST /v1.0/users/{userId}/assignLicense
Content-Type: application/json
{
"addLicenses": [],
"removeLicenses": ["cbdc14ab-d96c-4c30-b9f4-6ada7cdc1d46"]
}
Assign a license but disable specific plans (e.g., give E3 without Teams):
POST /v1.0/users/{userId}/assignLicense
Content-Type: application/json
{
"addLicenses": [
{
"skuId": "05e9a617-0261-4cee-bb44-138d3ef5d965",
"disabledPlans": ["57ff2da0-773e-42df-b2af-ffb7a2317929"]
}
],
"removeLicenses": []
}
Pull subscribedSkus and calculate:
warning state (near renewal, overallocated)Find licenses assigned to disabled accounts — these are reclaim candidates:
GET /v1.0/users?$filter=accountEnabled eq false and assignedLicenses/$count ne 0&$count=true&$select=id,displayName,userPrincipalName,assignedLicenses
Users licensed but not signing in (90+ days):
GET /v1.0/users?$filter=accountEnabled eq true&$select=id,displayName,userPrincipalName,assignedLicenses,signInActivity
Filter results where signInActivity.lastSignInDateTime < (today - 90 days).
| Optimization | Estimated Saving |
|---|---|
| Remove licenses from disabled accounts | # disabled × monthly seat cost |
| Downgrade inactive users to lighter SKU | SKU price delta × count |
| Recover unused purchased seats | (purchased - consumed) seats available |
| SKU Part Number | GUID | Notes |
|---|---|---|
SPE_E3 | 05e9a617-0261-4cee-bb44-138d3ef5d965 | M365 E3 |
SPE_E5 | 06ebc4ee-1bb5-47dd-8120-11324bc54e06 | M365 E5 |
O365_BUSINESS_PREMIUM | cbdc14ab-d96c-4c30-b9f4-6ada7cdc1d46 | M365 Business Premium |
ENTERPRISEPACK | 6fd2c87f-b296-42f0-b197-1e91e994b900 | Office 365 E3 |
AAD_PREMIUM | 078d2b04-f1bd-4111-bbd4-b4b1b354cef4 | Entra ID P1 |
AAD_PREMIUM_P2 | 84a661c4-e949-4bd2-a560-ed7766fcaf2b | Entra ID P2 |
EMS | efccb6f7-5641-4e0e-bd10-b4976e1bf68e | EMS E3 |
| Error | Cause | Resolution |
|---|---|---|
LicenseAssignmentError | No usageLocation on user | Set usageLocation first |
MutuallyExclusiveLicenses | Two conflicting SKUs | Remove old SKU before assigning new |
Request_ResourceNotFound | Invalid SKU GUID | Verify GUID against subscribedSkus |
Authorization_RequestDenied | Missing Directory.ReadWrite.All | Grant admin consent |
| Task | Microsoft Graph Permission |
|---|---|
| View subscribed SKUs | Directory.Read.All |
| View user licenses | User.Read.All |
| Assign/remove licenses | User.ReadWrite.All or Directory.ReadWrite.All |
| Sign-in activity | AuditLog.Read.All |
What SKILL.md sets; muted values are Claude Code's defaults
When checking, assigning, removing, or auditing Microsoft 365 licenses for a customer tenant. Use when: m365 license, microsoft 365 license, m365 seats, m365 sku, license audit, license usage m365, unused license m365, license assignment m365, m365 subscription, or license optimization.
Three short reads, in order
npx claudepluginhub wyre-ai/msp-claude-plugins --plugin m3658 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.
/Other plugins' skills for the same job