Home » Blog » SharePoint Online » How to Set Retention Policy in SharePoint Online? Easy Guide

How to Set Retention Policy in SharePoint Online? Easy Guide

author
Published By Raj Kumar
Anuraag Singh
Approved By Anuraag Singh
Published On September 5th, 2024
Reading Time 5 Minutes Reading

How to set retention policy in SharePoint Online? It became a common query for either IT admins or new SharePoint administrators.

Setting up a retention policy in SharePoint Online is crucial for managing your organization’s data efficiently. No matter, whether you are handling sensitive or less sensitive data. A retention policy helps to ensure that the data is preserved for a specific period and deleted when it is no longer required.

In this guide, we will walk you through the necessary steps to create a retention policy in SharePoint Online. This SharePoint retention policy tutorial will help you maintain your organization’s records and required retention strategies.

What are Retention Policies?

Retention policies are one of the top-notch features of SharePoint Online. They are rules that determine how long SharePoint data( Document Library, Lists, etc.) should be retained in SharePoint Online. There are two types of retention policies:-

  1. Static Retention Policies [fixed retention period].
  2. Adaptive Retention Policies [ varies depending upon conditions].

Importance of Retention Policies

There are different reasons to create and manage retention policies in SharePoint Online. Some of the major ones are as follows:-

1. Legal Necessities – In most organizations, they need to manage the data for a specific time period. Setting the retention policies as per the requirements helps to preserve their data.

2. Cost Efficient – Exceeding storage of SharePoint Online stimulates you to buy more storage. Retention policies delete the expired data automatically as per their retention period. As the expired data gets deleted, you can check storage space in SharePoint Online to ensure there is empty space which you can use further to store the required data.

3. Enhancing Searching Experience – Automatically removal of unnecessary data from SharePoint Online helps to improve the search experience.

How to Set Retention Policy in SharePoint Online Using Admin Center?

Follow the below steps to create and set the retention policy in SharePoint Online.

Step 1. Open the Microsoft 365 App Launcher and hit the Compliance option.

compliance
Step 2. Now, in the Microsoft Purview, from the data lifecycle management, open Microsoft 365.

Open Retention Policy
Step 3. Open the retention policies tab, and click on New Retention policy.

Create a retention policy in SharePoint Online
Step 4. Assign name and description to the policy and then Next.
Step 5. Add the admin units if required, then move Next.
Step 6. Now, finalize the type of retention policy: Static or Adaptive.

Set retentiion policy type
Step 7. Choose the location where you want to apply the policy.
Step 8. Specify the retention period time, retention period. Also, choose the option that you want to do at the end of the retention period: Delete automatically or do nothing. Choose the best-fit option from Retain items forever or Only delete items when they reach a certain age.

Compete the requirements of retention policy settings
Step 9. Now Review all of the details and hit the Submit button.
Note: It might take 1 week to come into effect.
Step 10. You can also check the policy from the dashboard of policies.

How to Set Retention Policy in SharePoint Online Using PowerShell?

Execute the below commands, if you are good at PowerShell commands.

Try {

Connect-IPPSSession

$NewPolicy = New-RetentionCompliancePolicy `
-Name "New Retention Policy" `
-Comment "Retention Policy to Preserve All of the Deleted Items" `
-SharePointLocation All `
-OneDriveLocation All `
-ModernGroupLocation All `
-Enabled $True

New-RetentionComplianceRule `
-Name "SharePoint Online Retention Policy Rules" `
-Policy $NewPolicy.Id `
-RetentionDuration 365 `
-RetentionComplianceAction KeepAndDelete `
-ExpirationDateOption ModificationAgeInDays

}
Catch {
write-host "Error: $($_.Exception.Message)" -foregroundcolor Red
}

Effects of Publishing a Retention Policy in SharePoint Online

There are some key effects of creating and applying a retention policy and these are.

1. Can’t Delete a SharePoint Site – After applying the retention policy on the SharePoint site, the site cannot be deleted. Even if you try to delete it, it shows you an error message.

Can’t Delete a SharePoint Site

2. Unable to Delete a Non-Empty Folder – You cannot delete the non-empty folder. If you try to delete a folder who is having content comes under the effect of a retention policy. Then you will find an error message like:-

Unable to Delete a Non-Empty Folder

3. Establishing a Preservation Hold Library – After applying the retention policy in SharePoint sites, if any of the document library is deleted, then it moves to the Preservation Hold Library. It is a kind of library that stores all of the deleted documents.

How Retention Works in SharePoint?

When the files are deleted by the system itself after the retention time has passed, then what happens next?

1. When the item is deleted by the system then in the Recycle bin “Deleted By” column has a system account.
2. The system only checks the item’s retention after 30 days. So, if an employee leaves the organization but the retention period has not passed. Then their data will remain in SharePoint until the retention period has passed.

What After Data Deletion As Per Retention Period in SharePoint?

Once the SharePoint sites and other data get deleted as per the time period of the retention policy, it is impossible to restore deleted SharePoint sites.

Due to this, SharePoint administrators always use the Efficient SharePoint Migration Tool to store a copy of SharePoint data. This tool can perform SharePoint tenant to tenant migration without any data loss.

Download Now Purchase Now

Its impeccable features and quick steps make the process simpler. Here are the steps that you need to follow.

  • Step 1. Download and Set up the tool.
  • Step 2. Choose O365 as the Source and Destination.
  • Step 3. Select the Sites option and provide admin details.
  • Step 4. Map the Source and Destination users.
  • Step 5. Lastly, click on Start Migration.

Final Words

In this comprehensive write-up, we have explained how to set retention policy in SharePoint Online along with its benefits. No doubt, it is very helpful in reducing storage costs and in the prevention of accidental data loss. But, you should also monitor it regularly to ensure the correct conditions are set in the retention policy.

Connect With Us

+9111-28084986