How to Set Retention Period in OneDrive for Business?

Requirement: Increase Onedrive for Business Retention Period

How to Configure OneDrive for Business Deleted User Retention?
In a typical scenario, When a user leaves the company, the user account is deleted from the Active Directory and it gets synchronized to Microsoft 365 environment. Then the OneDrive cleanup job runs and OneDrive site is marked for deletion. When a OneDrive for the Business site collection is scheduled for deletion, the ownership of the site is transferred to the manager of the user. In case, the Manager Property is missing for the user account profile that is being deleted, then OneDrive cleanup job tries to send an Email notification to "Secondary Owner" if its populated.

The manager or the secondary owner will receive an email notification about the OneDrive site, and that the OneDrive will be deleted at the end of the retention period. They'll get a second email notification Seven days before the retention period expires. After 7 days, the OneDrive for the deleted user is moved to the site collection recycle bin and kept for an additional 93 days. The default retention period for OneDrive sites that are marked for deletion is 30 days, and you can extend the retention period either in OneDrive admin center or by using PowerShell.

Set Retention Period in OneDrive for Business
To set the number of days to retain OneDrive site after a user account is marked for deletion, follow these steps:
  • Login to OneDrive Admin center https://admin.onedrive.com/
  • Click on "Storage" link under OneDrive admin center.
  • In the storage page, we've the number of days to retain files in OneDrive after a user account is marked for deletion.office 365 onedrive for business retention
  • Enter the number of days you want to retain OneDrive site after a user account is marked for deletion in "Days to retain files in OneDrive after a user account is marked for deletion". The minimum value for this setting is 30 days and the maximum value is 3650 days (10 years).

PowerShell to Set OneDrive for Business Retention Period
You can configure for how long to retain the files after a user is marked for deletion using the Set-SPOTenant PowerShell cmdlet. The setting will really take effect for the next user that is deleted, and the count beings as soon as the user account is deleted in the Microsoft 365 admin center. Let's configure retention policy for OneDrive for business for deleted user to 90 days.
#Parameters
$TenantAdminURL = "https://crescent-admin.sharepoint.com"

#Connect to Admin Center
Connect-SPOService -Url $TenantAdminURL -Credential (Get-Credential)

#Set onedrive for business retention period
Set-SPOTenant -OrphanedPersonalSitesRetentionPeriod 90

Microsoft documentation: https://docs.microsoft.com/en-us/onedrive/set-retention
How to Set Retention Period in OneDrive for Business? How to Set Retention Period in OneDrive for Business? Reviewed by Salaudeen Rajack on August 20, 2019 Rating: 5

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.