๐ณ Recipe ยท Licensing & Cost Optimization
Check M365 License Subscription Counts and Usage
Audit subscribed SKUs, consumed seats, and available licenses across your Microsoft 365 tenant
Complexity
Beginner
Impact
read-only + licensing + cost-optimization + reporting
Context
Why This Matters
Microsoft 365 licenses represent a significant recurring cost for most organizations, and running out of available seats can block user onboarding, mailbox creation, and service activation. Periodically reviewing license counts ensures you have headroom for new hires, identifies unused licenses that can be reclaimed or downgraded, and supports budgeting and true-up conversations with your reseller or Microsoft directly.
Run this recipe:
- Before onboarding batches of new users
- Monthly as part of tenant hygiene
- Before subscription renewal to right-size purchases
- When investigating "license assignment failed" errors
Expected Outcomes
After completing this recipe you will have:
- A complete list of every subscribed SKU in the tenant
- The number of prepaid (enabled) units per SKU
- The number of consumed (assigned) units per SKU
- The number of available seats remaining for each SKU
- Visibility into suspended, warning, and locked-out units that may indicate billing issues
Risks & Considerations
Read-only operation โ the Graph endpoint used here does not modify any data, so there is no direct risk. However, keep the following in mind:
- SKU part numbers are cryptic.
ENTERPRISEPACKmeans Office 365 E3,STANDARDPACKmeans E1, etc. Always map them to friendly names before sharing reports. - Free SKUs inflate pools. SKUs like
FLOW_FREEandPOWER_BI_STANDARDoften show 10,000 or 1,000,000 units โ don't treat those as purchased seats. - Trial and grace-period subscriptions appear the same as paid ones. Cross-check with the M365 admin center billing page for actual billing status.
- Do not share raw SKU IDs externally in support tickets without context; they are tenant-agnostic but the consumption counts are sensitive.
Required Permissions
| Permission | Why It's Needed |
|---|---|
| Organization.Read.All | Required to read subscribedSkus for the tenant via Microsoft Graph. |
| Directory.Read.All | Alternative permission that also grants read access to subscribedSkus. |
| License Administrator or Global Reader role | Required for interactive admin center or PowerShell sign-in to view license data. |
The fastest way to get this done: just ask Dex. Copy the prompt below and paste it into your Dex conversation.
For IT Admins
Paste into Dex Pro
View license usage in the Microsoft 365 admin center
- Sign in to the Microsoft 365 admin center as a Global Reader, License Administrator, or Global Administrator.
- In the left navigation, expand .
- Review the license table. Each row shows:
- Name โ friendly product name (e.g., Microsoft 365 Business Premium)
- Purchased licenses โ total prepaid seats
- Assigned licenses โ seats currently assigned to users
- Available licenses โ the difference (purchased minus assigned)
- Click any license name to see the list of users currently assigned to it, which is useful for reclaiming unused seats.
Optional: check Azure AD / Entra view
- Go to the Microsoft Entra admin center.
- Navigate to .
- This view shows the same data and also includes SKU part numbers, which are useful if you plan to cross-reference with Graph or PowerShell output.
Query subscribed SKUs via Microsoft Graph
The subscribedSkus resource returns every license SKU in the tenant along with prepaid and consumed unit counts.
Endpoint
GET https://graph.microsoft.com/v1.0/subscribedSkus?$select=skuId,skuPartNumber,prepaidUnits,consumedUnitsRequired headers
Authorization: Bearer <access_token>
Accept: application/jsonExample response (trimmed)
{
"value": [
{
"skuId": "f245ecc8-75af-4f8e-b61f-27d8114de5f3",
"skuPartNumber": "O365_BUSINESS_PREMIUM",
"consumedUnits": 33,
"prepaidUnits": {
"enabled": 34,
"suspended": 0,
"warning": 0,
"lockedOut": 0
}
}
]
}Interpreting the fields
prepaidUnits.enabledโ total active paid seatsprepaidUnits.warningโ seats in a grace period after non-payment; still usableprepaidUnits.suspendedโ seats suspended (e.g., billing failure); not usableconsumedUnitsโ seats currently assigned to users or groups- Available seats =
prepaidUnits.enabled - consumedUnits
Try it in Graph Explorer
Open Graph Explorer, sign in, and paste the URL above. Consent to Organization.Read.All if prompted.
Retrieve license usage with PowerShell
The Microsoft Graph PowerShell SDK wraps the subscribedSkus endpoint in the Get-MgSubscribedSku cmdlet.
1. Install the module (first time only)
Install-Module Microsoft.Graph -Scope CurrentUser2. Connect with the required scope
Connect-MgGraph -Scopes "Organization.Read.All"3. Pull and format license data
Get-MgSubscribedSku | Select-Object `
SkuPartNumber,
@{N='Purchased';E={$_.PrepaidUnits.Enabled}},
@{N='Consumed';E={$_.ConsumedUnits}},
@{N='Available';E={$_.PrepaidUnits.Enabled - $_.ConsumedUnits}} |
Sort-Object SkuPartNumber |
Format-Table -AutoSizeThis produces a clean table you can pipe to Export-Csv for reporting. The downloadable script below wraps this in a reusable function with optional CSV export and a low-availability warning threshold.
Next steps