How to Find Unused Microsoft 365 Licenses and Inactive Accounts

To find unused Microsoft 365 licenses, compare the licenses you bought with the licenses assigned, then check each licensed account's last sign-in in Microsoft Entra and its service activity in the Microsoft 365 usage reports. Any license that is unassigned, assigned to a disabled or long-inactive account, or assigned but never used is a candidate to reclaim.
It takes three reports and a decision about what counts as inactive. The places to look below are as Microsoft documents them in November 2026.
Three kinds of unused license
"Unused" covers three different problems, and each has its own report and its own fix.
- Bought but unassigned. The subscription has more licenses than people holding them. You are paying for stock nobody sits on.
- Assigned to an account that is gone or idle. A leaver, a disabled account or a user who has not signed in for months still holds a license. It is a process failure: nobody removed the license when the person left. See the joiners, movers and leavers process.
- Assigned and signed in, but the paid services are unused. The account is active, yet the person never opens the apps the plan pays for, or a cheaper plan would cover what they do.
The third kind is covered in Microsoft 365 E3/E5 optimization. The first two can be done this week.
Step 1: purchased against assigned
Start with the count. In the Microsoft 365 admin center, go to Billing, then Licenses. Each product shows how many licenses you have and how many are assigned, and the difference is your unassigned stock (Microsoft Learn).
For a script or a recurring check, the Microsoft Graph subscribedSkus endpoint returns the same numbers for every SKU in the tenant: prepaidUnits.enabled is what you bought and consumedUnits is what is assigned (Microsoft Learn). It needs the LicenseAssignment.Read.All permission. Enabled minus consumed is the first number to write down.
Step 2: inactive and disabled accounts
Assigned licenses are where most of the money sits, so list every licensed account with its last sign-in. Microsoft Entra keeps this on the user object as the signInActivity property, with three timestamps: lastSignInDateTime (the last interactive attempt, including failed ones), lastNonInteractiveSignInDateTime (a client signing in on the user's behalf) and lastSuccessfulSignInDateTime (the last success of either kind) (Microsoft Learn). For inactivity, use the last successful sign-in: a failed attempt counts as a sign-in in the first one.
There are prerequisites. Microsoft documents that reading lastSuccessfulSignInDateTime through Graph requires a Microsoft Entra ID P1 or P2 license, the AuditLog.Read.All and User.Read.All permissions, and at least the Reports Reader role in the admin center. The property is not returned unless you ask for it with $select=signInActivity, and the value can lag by up to 24 hours (Microsoft Learn).
Then look for four patterns:
- Licensed accounts whose last successful sign-in is older than your threshold.
- Licensed accounts that never signed in. The sign-in value is blank for them.
- Accounts with
accountEnabledset to false that still hold a license. A disabled account cannot use anything it pays for. - Guest accounts that hold a license, which should be rare.
The threshold is your choice. Thirty days catches seasonal absence as well as leavers, while Microsoft notes that a reasonable window in many organizations is 90 to 180 days. Pick one, write it down and apply it the same way every quarter.
Step 3: service activity per user
A signed-in user is not necessarily a user of the license. The Microsoft 365 usage reports show the last activity date per service. In the admin center, go to Reports, then Usage, open Microsoft 365 apps and select the Active users tab. The table lists each user's last active date for Exchange, OneDrive, SharePoint, Teams and Viva Engage next to whether that license is assigned, and you can export it as a CSV file (Microsoft Learn).
For automation, the Graph reports API has getOffice365ActiveUserDetail, which takes a period of D7, D30, D90 or D180 and returns the same per-service last activity dates and license flags, with the Reports.Read.All permission (Microsoft Learn).
One trap: by default every usage report conceals user names, so the table shows hashed identifiers. A Global Administrator can turn this off under Settings, Org settings, Services, Reports, by clearing the setting that conceals user, group and site names, if your privacy rules allow it (Microsoft Learn). The same setting applies to the Graph reports.
Step 4: what not to count
Not every idle account is waste. Remove these from the list first:
- Shared mailboxes. They have no sign-in and usually need no license of their own.
- Service and break-glass accounts. A break-glass account is meant to sit unused. Removing its license can lock you out on the day you need it.
- People on leave. Parental or long-term sick leave looks exactly like abandonment on a 90-day report. Ask HR, not the report.
- Accounts under retention or litigation hold. A mailbox may need its license to keep the hold in place. Check with your compliance owner first.
Write each exclusion down once and reuse it at the next review.
Step 5: reclaim, then reduce
Reclaiming and reducing are two different actions. Unassigning a license from a user puts the license back in your unassigned stock, where it can serve the next joiner instead of a new purchase. This is the same idea as license reharvesting.
To stop the problem recurring, assign licenses to groups rather than to individual users. In the admin center, Billing, Licenses lets you assign a license to a security group or a Microsoft 365 group (Microsoft Learn). When a person leaves the group, the license goes with the membership, so the offboarding step that people forget becomes a group change.
Reducing what you pay is a contract question. For a subscription on a Microsoft Customer Agreement billing account, Microsoft says you can remove licenses only within seven days of buying or renewing; a reduction made later shows up on the first invoice after the renewal date. If you bought through a partner, the reduction goes through them, and you cannot remove licenses that are all assigned, so unassign first (Microsoft Learn). So the reclaimed licenses save money at the next renewal, which is why the review belongs before the notice date, not after it. The Microsoft 365 licensing guide covers the plans themselves.
The findings at a glance
| Finding | Where to look | Action |
|---|---|---|
| More licenses bought than assigned | Admin center, Billing, Licenses; Graph subscribedSkus | Assign to joiners first, then reduce at renewal |
| Licensed account disabled or deleted | Entra Users, accountEnabled is false | Unassign the license |
| Licensed account with no recent successful sign-in | Entra signInActivity, lastSuccessfulSignInDateTime | Confirm with the manager, then unassign |
| Signed in, but services unused | Reports, Usage, Active users; getOffice365ActiveUserDetail | Move to a cheaper plan or remove the add-on |
| Idle but needed | Shared, break-glass, leave, hold | Exclude with a written reason |
How LICENSEWARE does it
LICENSEWARE reads the tenant through the Microsoft Graph and Defender integration: user profiles, assigned licenses, service plan assignments and disabled accounts from Entra ID, plus the Microsoft 365 usage and activity reports, with read-only permissions.
Microsoft Deployment Manager (MDM) is the app for Microsoft 365: it shows Microsoft 365 licenses and usage from Graph. License and Contracts Manager keeps your Microsoft agreements and renewal dates beside them, and the platform shows the unused licenses before the next renewal, so the reclaim list exists while there is still time to act on it. Our E3/E5 optimization guide puts inactive users still provisioned at 5 to 15% of seats in organizations with slow offboarding.
Sources
- Microsoft Learn: How to manage inactive user accounts
- Microsoft Learn: signInActivity resource type
- Microsoft Learn: List subscribedSkus
- Microsoft Learn: reportRoot getOffice365ActiveUserDetail
- Microsoft Learn: Microsoft 365 apps Active users report
- Microsoft Learn: Usage reports overview
- Microsoft Learn: Assign or unassign licenses to a group
- Microsoft Learn: Buy or remove licenses