Document deletion policy in SharePoint Online Office 365

This SharePoint tutorial, we will discuss, document Deletion Policies in Office 365 SharePoint Online. What are Document Deletion Policies in Office 365 and how to create document deletion policy as well as how to implement the document deletion policy in a SharePoint site collection?

In lots of enterprises, one common requirement comes as to store documents for a specific period of time and after that, the document should get deleted. SharePoint Online provides this document deletion policy feature which will help to achieve this kind of requirement.

It will delete documents from the site after a specific period of time. Not only from the SharePoint site, but it also deletes documents from the user’s OneDrive for Business sites.

Previously SharePoint provides Records management and Information management policies that are helpful to deal with structured data. Document deletion policies help in the automatic deletion of unstructured data such as OneDrive for Business sites and team sites.

Below are a few points we should remember in document deletion policies:

As the name suggest document deletion policies work only for document libraries not with the list.

Three main components of this: Policies, Rules and Site Collections

We can create single or multiple policies. We can add single or multiple rules to a single document deletion policy. And then we can assign a policy to a site collection template (like team site template) or to a single site collection also. When you assign a document deletion policy to a site collection template, then the policy will be available to all site collections created from that template.

Apart from this you can also create a single policy and make it mandatory. Then the policy can be assigned to all sites in the site collection.

Document deletion policies are inherited meaning if a site owner selects a document deletion policy for their site then all the subsites will inherit the policy from the parent. But site owners can anytime break the inheritance and can apply a different policy.

Whenever you apply a document deletion policy, you should remember that the time period depends on the document was created or modified, not the time since the policy was assigned. When you assign the policy for the first time, all documents in the site are evaluated and, if they meet the criteria, they will be deleted. This applies to all existing documents, not just new documents created since the policy was assigned.

Another point to remember is that A site collection or a site collection template can have one or more policies assigned to it, and each of those policies can have one or more rules. But there can be only one policy that can active per site and there can be only one deletion rule that’s active at any time for the libraries within the site. Check a very good fig like below:

document deletion policy sharepoint

Create Document Deletion Policy in SharePoint

There two ways you can create open Document Deletion Policy Center:

From Office 365 Security & Compliance:

Login to your Office 365, then from App launcher click on “Security & Compliance Center”. Then from the left navigation, click on “Data management” and then click on Retention. Then from the Retention, click on “Manage document deletion policies for SharePoint Online and OneDrive for Business”. The first time when you click on this link it will create the Document Deletion Policy Center automatically.

document deletion policy sharepoint 2016

From Create New Site Template:

The other way we can create a Document Deletion Policy Center is Login to Office 365, then go to SharePoint administration. There create a new site collection and then choose “Compliance Policy Center” template which is under the Enterprise tab as shown in the fig below:

document deletion policy sharepoint 2013

Then in the Compliance Policy Center, click on Deletion Policies like below:

document deletion policy sharepoint online

This will open the Deletion Policies library which will have two default Policies. Click on New item to create a new policy.

document deletion policies sharepoint online

Here in the New Deletion Policy page, give a Policy Name, and Description.

document retention policy sharepoint

Then click on the +New button to add a new rule to the policy. Here give a name for the rule. Either you can delete an item to recycle bin or you can permanently delete the item. Here I have chosen Delete to Recycle Bin option.

Date from when the document deletion date will be calculated, in this case, choose either Last Modified Date or Created date. Whatever option you will choose, the time period calculation will be done based on this option.

The time period after which the document will be deleted: Here you can add Years, Months or Days. Lets us say if you want to delete documents whose last modified date before 2 months, then you can add 2 in the textbox and then select Months from the drop-down.

Also, you can Set as default rule checkbox to make this rule as a default rule.

document retention policy sharepoint online

Once you Save the rule, the policy will look like below:

document retention policy sharepoint 2013

Then click on Save to Save the Policy. It will reflect in the Deletion Policies library. You can see now 3 policies.

document retention policy in sharepoint 2016

Assign Deletion Policies to SharePoint Site Collection Templates

Now we will assign the policy to a site collection template. So that the Deletion Policy will be available to all site collections created from the same template.

In the Document Deletion Policy Center, click on “Policy Assignment for Templates” link and then click on +new item in “Policy Assignments for Templates” library like below:

sharepoint document library retention policy

Then in the New Template Assignment, first click on “First choose a template” button as shown in the fig below:

document retention policy in sharepoint online

Here either you can choose from OneDrive for Business Template or You can choose from Site Collection template. Then I am choosing here for the Team Site template. So any site collection using the Team site template will have this Policy.

document retention policy in sharepoint 2016

Then assign the rule which we have created in the previous steps like below:

document deletion policy sharepoint

Now you will look at the New Template Assignment, the screen looks like below. Where we have chosen the Template, Rule. And also if you want to make this rule as mandatory, then check the checkbox “Make Policy as Mandatory” like below:

Document deletion policy in SharePoint Online Office 365

Assign Document Deletion Policy To SharePoint Site Collection

Now we will discuss how we can assign Document Deletion Policy to site collections. From the “Document Deletion Policy Center” site, click on “Policy Assignments for Site Collections” link as which will open “Policy Assignments for Site Collections” document library. Here click on +new items as shown in the fig below:

document deletion policy sharepoint

Then in the “New: Site Collection Assignment” page click on “First choose a site collection” link. This will open Choose a site collection dialog box. Here search for your site collection as shown in the fig below:

document deletion policy sharepoint online

Then click on OK. Then assign the rule as shown in the fig below, and also if you want to make the policy as mandatory, then check the checkbox “Mark Policy as Mandatory” as shown in the fig below:

document deletion policies sharepoint online

Check Policy in SharePoint Site Collection

Now we can the Policy in the site collection. Go back to your Office 365 SharePoint Online site collection. Click on the gear icon and then click on Site settings. This will open the Site settings page. Click on “Document Deletion Policies” which is under Site Collection Administration.

If you will not be able to see this link, wait till 24 hours, it should be visible. For me, it came in 2 hours. It should look like below:

document retention policy sharepoint online

The SharePoint document policy will appear like below:

document retention policy sharepoint 2013

You may like following SharePoint tutorials:

This tutorial, we learned what is document deletion policy in SharePoint? how to create document deletion policy as well as how to implement the document deletion policy in a SharePoint site collection?

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.

Bhawana Rathore

Hello Everyone!! I am Bhawana a SharePoint MVP and having about 8+ years of SharePoint experience as well as in .Net technologies . I have worked in all the versions of SharePoint from wss to Office 365. I have good exposure in Customization and Migration using Nintex, Metalogix tools . Now exploring more in SharePoint 2016 :) Hope here I can contribute and share my knowledge to the fullest. As I believe "There is no wealth like knowledge, and no poverty like ignorance"

  • RD says:

    Hey i am unable to see the Data Management option in o365

  • >