When you delete a user from Microsoft 365, their OneDrive files do not disappear immediately. Microsoft keeps the files for a default retention period so you can recover them or transfer ownership to another user. Without proper configuration, you might lose access to critical business data after the retention window closes. This article explains how to set the OneDrive retention period for deleted users, what happens to the files during that time, and how to extend or shorten the period as needed.
Key Takeaways: OneDrive Retention for Deleted Users
- Microsoft 365 admin center > Setup > Org settings > OneDrive > Retention: Controls the number of days a deleted user’s OneDrive files remain accessible to admins.
- SharePoint admin center > Active sites > user’s OneDrive site > Access: Allows you to restore or transfer files before the retention period expires.
- Microsoft 365 admin center > Users > Deleted users > Restore: Restoring a deleted user within 30 days also restores their OneDrive data immediately.
Understanding OneDrive Retention for Deleted Users
When a user is deleted from Microsoft 365, their OneDrive files enter a retention period. By default, this period is 30 days. During these 30 days, the files are still stored in the original OneDrive site but are hidden from non-admin users. Global admins and SharePoint admins can access the site, download files, or transfer ownership to an active user.
After the retention period expires, the OneDrive site is moved to the recycle bin for an additional 93 days. After that, the data is permanently deleted. The total time you have to recover files is 30 days plus 93 days, or 123 days, unless you change the retention setting.
The retention period applies only to the user’s OneDrive, not to SharePoint sites they may have accessed. The setting is tenant-wide, meaning it affects all deleted users in your organization. You cannot set different retention periods for different users.
What Happens to Shared Files
If the deleted user shared files with others, those shared links stop working immediately after the user is deleted. However, if another user has already synced the files to their local device, they retain local copies. To prevent data loss, you should transfer ownership of shared files to another user before deleting the original account.
Steps to Configure OneDrive Retention Period
- Sign in to the Microsoft 365 admin center
Go to admin.microsoft.com and sign in with a Global admin or SharePoint admin account. - Navigate to Org settings
In the left navigation, select Setup > Org settings. - Open the OneDrive settings page
On the Org settings page, scroll down and select OneDrive. If you do not see it, use the search box at the top of the page. - Locate the retention setting
In the OneDrive settings pane, select Retention from the list on the left. The current retention period is displayed in days. - Set the retention period
Enter a number between 1 and 365 in the Days to retain files after a user account is deleted field. The default is 30. - Save the change
Click Save at the bottom of the pane. The new retention period applies immediately to all future deleted users. Existing deleted users retain their original retention period.
The change does not affect users who were already deleted before you changed the setting. Their retention period remains whatever was set at the time of deletion.
How to Access a Deleted User’s OneDrive Before Retention Expires
- Go to the SharePoint admin center
Open admin.microsoft.com, select Admin centers > SharePoint. - Find the deleted user’s site
In the SharePoint admin center, select Sites > Active sites. Click Filter and choose Group-connected sites or type the user’s name in the search box. The site URL will contain the user’s email prefix, for examplehttps://yourtenant-my.sharepoint.com/personal/user_domain_com. - Add yourself as a site admin
Select the site, click Access in the toolbar, then Add people. Enter your own email address and assign the Full control permission level. - Browse the files
Click the site URL to open the OneDrive site. You can now download files or transfer them to another user by moving them to a different OneDrive or SharePoint library.
If you cannot find the site under Active sites, check Deleted sites in the SharePoint admin center. Sites remain there for 93 days after the retention period expires.
Common Issues and Limitations
Deleted User’s OneDrive Not Showing in Active Sites
If the user was deleted more than 30 days ago, the site may have moved to the Deleted sites list. Go to Sites > Deleted sites in the SharePoint admin center. If the site is there, you can restore it within 93 days from the deletion date. After that, the data is permanently gone.
Retention Setting Not Applying to a Specific User
The retention setting is tenant-wide. You cannot set a different retention period for individual users. If you need a longer retention for a specific user, consider assigning a Microsoft 365 retention label or policy to their OneDrive before deleting the account. Retention labels override the default OneDrive retention setting.
Transferring Files to Another User
To transfer files from a deleted user’s OneDrive, you must access the site as an admin and manually download or copy the files. There is no built-in transfer tool for deleted user OneDrive sites. For active users, you can use the Add people feature to grant access and then move files using the web interface or sync client.
OneDrive Retention for Deleted Users vs Retention Labels
| Item | OneDrive Retention Setting | Microsoft 365 Retention Label |
|---|---|---|
| Scope | Tenant-wide for all deleted users | Applied to specific files or folders |
| Maximum duration | 365 days | Unlimited (indefinite retention) |
| Applies to | Entire OneDrive of a deleted user | Selected content within a OneDrive or SharePoint site |
| Configuration location | Microsoft 365 admin center > Org settings > OneDrive | Microsoft 365 compliance center > Information governance > Labels |
| Requires license | None beyond admin role | Microsoft 365 E3 or E5 license for the user |
Use the tenant retention setting as a baseline for all deleted users. Apply retention labels for specific files that must be kept longer than the tenant setting allows. Labels are applied before the user is deleted, so plan ahead for critical data.
You can now configure the OneDrive retention period for deleted users to match your organization’s data retention policy. The default 30 days works for most businesses, but you can extend it up to 365 days. To avoid losing files, set a reminder to check the SharePoint admin center for deleted sites before the retention period expires. For sensitive data, apply a Microsoft 365 retention label to individual files before deleting the user account.