Skip to main content
Five Steps for Cloud Compliance Readiness·A practical playbook for security teamsDownload
Insight · Microsoft 365

Unused paid licences

Unused paid licences are Microsoft 365 licence units your organisation pays for that are not assigned to anyone, or are assigned to accounts that no longer sign in. A read-only Microsoft Graph query of your subscribed SKUs shows purchased versus consumed units in a few minutes.

Why it matters

Every licence unit that is bought but not consumed is recurring spend with no user behind it. Microsoft documents that each subscribed SKU reports how many units are purchased (prepaidUnits) and how many are assigned (consumedUnits), so the gap can be measured directly rather than guessed (List subscribedSkus, Microsoft Graph).

A second kind of waste hides inside the consumed units: licences still assigned to accounts that have stopped signing in. Microsoft Graph exposes the last sign-in time of a user through the signInActivity property (signInActivity resource type), which lets you spot those accounts.

Find it yourself

This script is read-only: it only uses Get- cmdlets and read-only Graph scopes, and changes nothing in your tenant. It needs the Microsoft Graph PowerShell SDK (install guide). Reading signInActivity requires the AuditLog.Read.All permission and, per Microsoft, a Microsoft Entra ID P1 or P2 licence in the tenant.

# Read-only: purchased vs consumed units per licence (SKU)
Connect-MgGraph -Scopes 'Organization.Read.All'
Get-MgSubscribedSku |
  Select-Object SkuPartNumber,
    @{n='Purchased';e={$_.PrepaidUnits.Enabled}},
    @{n='Assigned';e={$_.ConsumedUnits}},
    @{n='Unassigned';e={$_.PrepaidUnits.Enabled - $_.ConsumedUnits}} |
  Sort-Object Unassigned -Descending

# Read-only: licensed users with no sign-in since a cut-off you choose
Connect-MgGraph -Scopes 'User.Read.All','AuditLog.Read.All'
$cutoff = (Get-Date).AddDays(-90)
Get-MgUser -All -Property DisplayName,UserPrincipalName,AssignedLicenses,SignInActivity |
  Where-Object { $_.AssignedLicenses.Count -gt 0 -and
    (-not $_.SignInActivity.LastSignInDateTime -or $_.SignInActivity.LastSignInDateTime -lt $cutoff) } |
  Select-Object DisplayName,UserPrincipalName,@{n='LastSignIn';e={$_.SignInActivity.LastSignInDateTime}}

Cmdlet reference: Get-MgSubscribedSku, Get-MgUser.

Read the result

In the first table, a SKU with a high Unassigned value is a licence you pay for but nobody uses. Compare it against hires you expect soon before treating it as surplus. In the second list, a blank LastSignIn means the account has no recorded sign-in; a date older than your cut-off means the licensed person is probably gone or no longer needs the product.

Treat both lists as leads, not verdicts. Shared mailboxes, service accounts and seasonal staff can look inactive while still being needed, so confirm with the account owner first.

What to do next

Confirm each candidate with the manager or owner, then reclaim the licence through the Microsoft 365 admin centre using Microsoft's documented steps (Remove licenses from users). Align the purchased quantity with real need when the subscription next renews, and repeat the check on a regular rhythm so surplus does not build up again.

See it continuously

ConfigCobra's Inventory & Insights keeps one inventory across clouds, including Microsoft 365 licences, with a built-in Unused paid licences risk view. The relation graph shows how licences connect to users, findings link back to the inventory objects they concern, and the view can be exported as CSV. ConfigCobra stays read-only. See Inventory and cost and licence optimisation.

See it for your whole tenant, continuously

Inventory & Insights lists these risks with built-in views and CSV export, read-only.

Get in touch

Let's talk.

Whether you're evaluating ConfigCobra, running an audit, or managing a client fleet — we respond within one business day.

Free trial