Introduction #
When an Office 365 user is deleted their OneDrive for Business data is retained for a defined retention period and access can be delegated to other users, such as a manager or nominated user, until the retention period lapses, after which it is deleted. The default retention period is 30 days.
Use this setting to extend the retention period up to 3,650 days (10 years).
License Requirements #
No additional licenses are required
User Impact #
Low
This setting has no negative user impact.
Parameters #
Number of days
Minimum: 30 (days) – Default by Microsoft
Maximum: 3650 (days) – Recommended
Admin Portal Reference #
In the Microsoft 365 Admin Center;
- Go to the SharePoint Online Admin Center
- Go to the Settings page
- Select OneDrive Retention
- Set the value Days to retain a deleted user’s OneDrive

PowerShell Reference #
Set-SPOTenant -OrphanedPersonalSitesRetentionPeriod <30-3650>
Compliance Reporting #
If Action is set to Notify #
We report the setting as compliant if the Days to retain a deleted user’s OneDrive value matches the parameter value.
We report the setting as non-compliant if the Days to retain a deleted user’s OneDrive value does not match the parameter value.
If Action is set to Enforce #
We report the setting as compliant if the Days to retain a deleted user’s OneDrive value matches the parameter value.
We report the setting as compliant-fixed when MSPMagic updates the retention period to match the parameter value because it didn’t match.