Are you about to lose your ex-employees' files?
When a person leaves and their Microsoft 365 licence is removed, their OneDrive goes read-only after 60 days, is archived after 93, and can be deleted after 365 unpaid days. Teams meeting recordings go with it. Find them first. Two ways to scan, both read-only:
Choose how to scan
Reads your user list and the OneDrive and mailbox usage reports from Microsoft Graph. Works in any Microsoft 365 tenant. No Entra ID P1 needed.
- Asks for two read-only permissions: User.Read.All and Reports.Read.All. Only when you click the button below.
- Sign in with an account that can read usage reports (Reports Reader, or an admin role). The first time in a tenant, an admin must approve the permissions.
- Results go straight from Microsoft to your browser. LeaverGuard never sees them. No refresh token is requested, so access ends when you close the page.
A small read-only script that asks SharePoint and Exchange directly. It only uses Get- commands and changes nothing.
- Download LeaverGuard-Check.ps1
- In PowerShell install the modules once:
Install-Module ExchangeOnlineManagement -Scope CurrentUserandInstall-Module Microsoft.Online.SharePoint.PowerShell -Scope CurrentUser. Then run.\LeaverGuard-Check.ps1. - Sign in with a read-only admin account. It writes
leaverguard.jsonon your computer. - Upload that file below.
It reads: every OneDrive (owner, size, last change, lock state and archive status) and every shared mailbox (size, archive, litigation hold, whether it has a licence). The script is plain text, so you can read it before you run it.
You can use both methods. The results are merged into one list.
What is changing?
A OneDrive belongs to a person's licence. When the licence is removed, Microsoft now gives the data a countdown (Microsoft Message Center notices MC836942 and MC1381110, and Manage unlicensed OneDrive accounts โ):
- Day 60: the OneDrive becomes read-only.
- Day 93: it is archived. Nobody can open it until an admin reactivates it or assigns a licence.
- Day 365 of unpaid time: since 1 July 2026, archived OneDrives that stay unpaid are on a cumulative 365-day clock and can then be deleted. For accounts already unlicensed on 1 July 2026, deletion can happen no earlier than 1 July 2027. Do not count on a retention policy or hold to protect an unpaid, unlicensed OneDrive: it can still be deleted. Keep the owner licensed, or copy the data out first.
- If the user is deleted from Entra ID: the OneDrive follows your "keep files of deleted users" setting (30 days by default) instead.
Teams meeting recordings are saved in the organiser's OneDrive, so they are lost with it.
Shared mailboxes are free until they need more. They need an Exchange Online Plan 2 licence if they hold more than 50 GB, use in-place archiving, or are on litigation hold. Without it they can stop working.
LeaverGuard is an independent tool and is not affiliated with Microsoft. Dates come from Microsoft documentation and can change. The rules do not apply to EDU, GCC or DoD tenants.
Frequently asked questions
What permissions does LeaverGuard ask for, and why?
Two read-only Microsoft permissions, requested only when you click Connect tenant: User.Read.All, to list your users and see who has no licence, and Reports.Read.All, to read the OneDrive and mailbox usage reports (size, file count, last activity). Neither can change anything or read file contents or email. Microsoft requires admin consent for both, and the signed-in person needs a role that can read usage reports, such as Reports Reader, or an admin role. No refresh token is requested, so access ends when you close the page.
Is my tenant data stored?
No. User lists, usage reports and uploaded files are read in your browser and are never sent to LeaverGuard, saved or logged. They are gone when you close the tab. Nothing is written to cookies, localStorage or IndexedDB.
Why do the results show random codes instead of names?
By default Microsoft hides user, group and site names in usage reports and shows scrambled IDs instead. A Global Administrator can switch this off in the Microsoft 365 admin center under Settings, Org settings, Services, Reports, by clearing Conceal user, group, and site names in all reports. Then scan again. The PowerShell script (method B) is not affected.
Do I need Entra ID P1 or any paid add-on?
No. LeaverGuard reads the user list and the standard usage reports, which are available in every Microsoft 365 tenant, with no Entra ID P1 or other add-on. LeaverGuard itself is free.