To keep a departed user's OneDrive files, give someone access before you delete the account: in the Microsoft 365 admin center open the user, select the OneDrive tab and Create link to files, then move what matters to a SharePoint site or another user's OneDrive. Deleting the user starts a OneDrive retention period of 30 days by default (configurable from 30 to 3,650 days), during which the manager or a secondary owner has access, followed by 93 days in the recycle bin. Separately, an unlicensed OneDrive becomes read-only after 60 days and is archived on day 93, so decide on retention and handover on day one of offboarding, not at the end.
Who this is for and what you will have at the end
This guide is for Microsoft 365, SharePoint and identity administrators who run leaver processes. It covers the OneDrive side of offboarding: who can get to the files, how long they survive, and how to clean up without losing anything the business needs.
At the end you will have:
- Tenant defaults set once: manager access delegation, a secondary owner and a OneDrive retention period that matches your policy.
- An offboarding sequence that hands files over before the account is deleted.
- A clear picture of how the deleted-user retention period, the unlicensed-account lifecycle and Microsoft Purview retention interact.
- PowerShell for restoring, granting and revoking access, and for permanent cleanup.
How the OneDrive lifecycle works after someone leaves
Two separate clocks apply, and both matter.
Clock 1: the deleted-user retention period
The OneDrive cleanup process starts only when the user account is deleted from Microsoft Entra ID, either in the Microsoft 365 admin center or through Active Directory synchronization. Blocking sign-in or removing the license doesn't start it.
| Stage | What happens |
|---|---|
| User deleted | The deletion syncs to SharePoint and the OneDrive Clean Up Job marks the OneDrive for deletion |
| Retention period starts | Default 30 days, configurable from 30 through 3,650 days. The deleted user stays in the Microsoft 365 admin center for 30 days |
| Access delegation | The manager, or the secondary owner if no manager is set, gets access and an email saying the OneDrive will be deleted |
| 7 days before the end | A reminder email goes to the manager or secondary owner |
| End of retention period | The OneDrive moves to the site collection recycle bin for 93 days; shared content is no longer accessible, and restore needs PowerShell |
Retention policies and retention labels from Microsoft Purview always take precedence over this process, so content can be kept longer than the OneDrive retention period. An eDiscovery hold also prevents deletion until the hold is removed, although the warning emails are still sent.
Clock 2: the unlicensed-account lifecycle
A OneDrive whose owner has no valid license, including one whose user was deleted, counts as unlicensed. With default tenant settings:
| Day unlicensed | State |
|---|---|
| 60 | Read-only |
| 93 | Archived through Microsoft 365 Archive, or moved to the recycle bin, depending on account and retention state |
| 275 | No longer available in eDiscovery |
| 365 | Subject to deletion after 365 cumulative unpaid days |
As of July 1, 2026, unpaid unlicensed accounts are subject to this cumulative 365-day nonpayment clock. For accounts already unlicensed and unpaid on that date, deletion risk starts no earlier than July 1, 2027. These changes don't apply to EDU, GCC or DoD customers.
Read-only and archived accounts stay visible in the admin tools, but Microsoft states that neither admins nor end users can open their content until an admin takes a supported action, such as assigning a license, enabling billing and reactivating, or unlocking a read-only account with PowerShell. The important consequence: a OneDrive is archived on its 93rd unlicensed day even if your OneDrive retention period is longer. If billing for unlicensed OneDrive accounts isn't enabled, Microsoft states that retention policies, retention settings and holds won't keep an unlicensed account beyond 365 days.
Prerequisites
- Roles: User Administrator (or a role such as Microsoft 365 Backup Administrator) for the admin center steps, and SharePoint Administrator for the SharePoint admin center, PowerShell and tenant settings. To give another user access to the mailbox and choose the OneDrive option while deleting a user in one flow, you need User Administrator, SharePoint Administrator and Exchange Administrator.
- Manager attribute: the manager field populated for users in Microsoft Entra ID, if you rely on automatic delegation.
- SharePoint Online Management Shell, the latest version, connected with
Connect-SPOService. - A destination for kept files: a SharePoint site or library owned by the team, rather than another person's OneDrive, for anything the business needs long term.
Step 1: Set the tenant defaults once
Turn on access delegation and a secondary owner
- In the SharePoint admin center, go to More features, and under User profiles select Open.
- Under My Site Settings, select Setup My Sites.
- Next to My Site Cleanup, make sure Enable access delegation is selected.
- In the My Site Cleanup section, specify a secondary owner. This account gets the OneDrive, and the notification emails, when a deleted user has no manager in Microsoft Entra ID.
- Select OK.
If delegation is disabled, or neither a manager nor a secondary owner exists, nobody gets automatic access and nobody is warned before the OneDrive is deleted.
Set the OneDrive retention period
In the SharePoint admin center, go to Settings > Retention, enter a value from 30 through 3,650 in the box for the number of days to retain a deleted user's OneDrive files, then select Save. The setting applies to the next user deleted and to users already in the deletion process. The equivalent PowerShell:
Connect-SPOService -Url https://contoso-admin.sharepoint.com
Set-SPOTenant -OrphanedPersonalSitesRetentionPeriod 90Choose the shortest period that gives managers enough time to review files. A long retention period doesn't stop the unlicensed-account archive on day 93.
Step 2: Hand the files over before deleting the account
Do the handover while the account still exists and is licensed. It's the simplest moment: the files are fully accessible and nothing is read-only yet.
Option A: give yourself access from the Microsoft 365 admin center
- In the Microsoft 365 admin center, go to Users > Active users and select the user.
- Select the OneDrive tab. Under Get access to files, select Create link to files.
- Open the link, then download the files or use Move to or Copy to to put them in a SharePoint library or another OneDrive.
When you move or copy documents that have version history, only the latest version is moved. The OneDrive tab options aren't currently supported for multi-geo tenants.
Option B: give another person access
- In the SharePoint admin center, go to More features > User profiles > Open.
- Under People, select Manage User Profiles, search for the former employee and select Find.
- Right-click the account, choose Manage site collection owners, add the new person to Site collection administrators and select OK.
The person can then open the OneDrive by its URL, which follows the pattern https://contoso-my.sharepoint.com/personal/user1_contoso_com. The PowerShell equivalent is:
Set-SPOUser -Site https://contoso-my.sharepoint.com/personal/meganb_contoso_com `
-LoginName admin@contoso.com -IsSiteCollectionAdmin $trueMove content to where it belongs
Microsoft's own recommendation for actively needed content in an unlicensed OneDrive is to move it to a SharePoint site or to an active, licensed OneDrive. A team library is usually the better target: it doesn't depend on one person staying, and SharePoint content isn't affected when a user leaves.
Step 3: Delete the user, or deliberately keep the account
In Users > Active users, select the user and choose Delete user. The Delete user page asks what to do with the license, the email and the OneDrive, and offers to give another user access to the OneDrive. The deleted account can be restored for 30 days.
Decide consciously when you keep the account instead:
- Shared mailbox or mail forwarding: Microsoft says not to delete an account converted to a shared mailbox or used for forwarding, because those functions still need it. A shared mailbox under 50 GB doesn't need a license, but once you remove it the OneDrive is unlicensed and follows Clock 2: read-only on day 60, archived on day 93. Move the OneDrive files out first. An account used for forwarding must keep its license, because removing it stops forwarding and deactivates the mailbox.
- License removed, account kept: the deleted-user retention period never starts, but the unlicensed lifecycle does. The SharePoint admin center reports these as License removed by admin with deletion blocked by Owner active in Entra ID.
If your directory synchronizes from Active Directory, delete the account in Active Directory; the deletion then flows to Microsoft Entra ID.
Step 4: Use Purview retention for content you must keep
For legal or regulatory retention, don't rely on the OneDrive retention period. Create a retention policy:
- In the Microsoft Purview portal, go to Solutions > Data Lifecycle Management > Policies > Retention policies.
- Select New retention policy, name it, and keep Full directory on Assign admin units.
- Choose Static (or Adaptive if you have adaptive scopes) and turn on the OneDrive accounts location. Leave it at all accounts or include and exclude specific ones.
- Choose whether to retain only, retain and then delete, or delete only, and set the period.
- Finish and save. It can take up to seven days for the policy to apply.
While a retention policy or label covers a departed user's OneDrive, sharing keeps working and the content stays discoverable in Content Search and eDiscovery. When the retention period ends with a delete action, content goes to the site collection recycle bin, where only an admin can reach it.
Keep the unlicensed rules in mind. Archived accounts honor retention policies, settings and litigation holds when billing for unlicensed OneDrive accounts is enabled. Without billing, an unlicensed account is subject to deletion after 365 cumulative unpaid days even if retention or holds exist. Microsoft's unlicensed-account article quotes a one-time reactivation fee of $0.60 per GB and archive storage of $0.05 per GB per month for unlicensed accounts beyond 93 days; check the current pay-as-you-go storage prices before you budget.
Step 5: Recover a OneDrive after the retention period
If the user was deleted less than 30 days ago, restore the user in the Microsoft 365 admin center and the OneDrive comes back with them. After that, a SharePoint Administrator can restore the OneDrive itself while it's still in the 93-day recycle bin window:
# Find deleted OneDrive accounts
Get-SPODeletedSite -IncludeOnlyPersonalSite | Format-Table Url
# Restore one and grant access
Restore-SPODeletedSite -Identity https://contoso-my.sharepoint.com/personal/meganb_contoso_com
Set-SPOUser -Site https://contoso-my.sharepoint.com/personal/meganb_contoso_com `
-LoginName admin@contoso.com -IsSiteCollectionAdmin $trueA restored OneDrive stays available until you delete it explicitly. If 93 days have already passed since the license was removed, restoring an unlicensed account from the recycle bin leads straight to archival.
Reactivate an archived account
An archived unlicensed OneDrive needs reactivation before anyone can read it. If the account still has an owner in Microsoft Entra ID, assigning a license reactivates it automatically within 24 to 48 hours at no reactivation fee. If the identity was deleted, set up pay-as-you-go billing, enable billing for unlicensed OneDrive accounts, then reactivate from Reports > OneDrive accounts > View more details in the SharePoint admin center, or with PowerShell:
Set-SPOSiteArchiveState -Identity https://contoso-my.sharepoint.com/personal/meganb_contoso_com `
-ArchiveState ActiveReactivation can take up to 24 hours, and the account stays active for 30 days before it's archived again. Standard storage, generally available for unlicensed OneDrive accounts starting in October 2026, adds -KeepActiveUntil for longer access and a tenant-wide active-storage period of 93 to 3,650 days set with Set-SPOTenant -UnlicensedOneDriveAccountsActiveStoragePeriod. Both need pay-as-you-go billing connected and Standard storage enabled in the Microsoft 365 admin center first; there's no PowerShell parameter to turn Standard storage on. With a longer period, the read-only stage still begins 33 days before the archive date. Microsoft's guidance is to keep the default 93 days unless you have a defined business, legal or compliance need.
Step 6: Revoke access and clean up
When the handover is finished, remove the extra site collection administrators, either in Manage site collection owners or with PowerShell:
Set-SPOUser -Site https://contoso-my.sharepoint.com/personal/meganb_contoso_com `
-LoginName admin@contoso.com -IsSiteCollectionAdmin $falseTo delete a OneDrive you have finished with, permanently, run:
Remove-SPOSite -Identity https://contoso-my.sharepoint.com/personal/meganb_contoso_com
Remove-SPODeletedSite -Identity https://contoso-my.sharepoint.com/personal/meganb_contoso_comA permanently deleted OneDrive can't be restored, and links and Teams file references to it stop working. Review the backlog regularly in the SharePoint admin center under Reports > OneDrive accounts; the detailed view lists every unlicensed account with its unlicensed date, reason, archive status and what is blocking deletion.
One limit no admin action fixes: files a departed user downloaded or synced to a personal computer stay on that computer, and there's no way to wipe them from the Microsoft 365 side. Device controls, such as those in the Zero Trust remote access architecture, are what reduce that risk before someone leaves.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Manager didn't get an access email | No manager set, delegation disabled, or no secondary owner | Set the manager in Microsoft Entra ID, enable access delegation and set a secondary owner |
| "User cannot be deleted. Please try again later." | The account has forwarding or was converted to a shared mailbox | Don't delete it; move the OneDrive files instead |
| OneDrive tab options missing in the admin center | Multi-geo tenant | Use Manage site collection owners or Set-SPOUser |
| Former user's OneDrive is read-only | 60 days unlicensed | Assign a license if the user still exists, or unlock the site with PowerShell, then move the content |
| OneDrive can't be opened at all | Archived on day 93 | Relicense the owner, or enable billing and reactivate |
| Deleting an unlicensed account fails | A retention policy or hold covers it | Review the Purview policy or hold first |
| Content missing from a new eDiscovery search | Past day 275 unlicensed, or deleted | Export earlier next time; deleted content isn't recoverable |
| Restored account archives immediately | Restored more than 93 days after license removal | Expected behavior; enable billing or relicense |
| Moved files lost their history | Move to and Copy to keep only the latest version | Expected; keep the original OneDrive under retention if history matters |
Checklist
- Access delegation enabled and a secondary owner set in the SharePoint admin center.
- OneDrive retention period chosen (30 to 3,650 days) and documented.
- Managers populated in Microsoft Entra ID for automatic delegation.
- Leaver process hands files over before deletion, using Create link to files or Manage site collection owners.
- Business content moved to SharePoint, not left in a former user's OneDrive.
- Accounts kept as shared mailboxes have their OneDrive files moved before the license is removed; accounts used for forwarding keep their license.
- Purview retention policy covers OneDrive accounts where regulation requires it, and billing decided for unlicensed accounts.
- Extra admin access revoked and finished OneDrives removed; the OneDrive accounts report reviewed monthly.
References
- OneDrive retention and deletion
- Set the OneDrive retention for deleted users
- Manage unlicensed OneDrive user accounts
- Standard storage for unlicensed OneDrive accounts
- Give another employee access to OneDrive and Outlook data
- Delete a user from your organization
- Forward a former employee's email or convert to a shared mailbox
- Restore a deleted OneDrive
- Learn about retention for SharePoint and OneDrive
- Create and configure retention policies