Skip to main content

How to set up document retention via retention labels in SharePoint and OneDrive

I recently blogged on how to set up retention policies on a SharePoint site. However, that process assumed you have the same retention requirements for all the content on the site. Too often, this is not the case. You might have some documents that need to be retained forever, while some that need to be retained just for a few years. In this case, you would need to individually assign document retention via retention labels in SharePoint (Office 365 to be precise).

With this post, I would like to explain to you how to set up such retention labels, as well as corresponding label retention policies, and publish them to specific sites in SharePoint.

NOTE: As of the writing of this post, Microsoft is splitting the Office 365 Security & Compliance Center into two separate centers: Office 365 Security Center and Office 365 Compliance Center. While my previous blog post on retention mentions the outgoing Office 365 Security & Compliance Center, for this post, I am using the new Compliance Center, so hopefully, instructions for this article and images will be relevant for years to come.

3 Steps to set up document retention via retention labels

There are three steps involved when it comes to setting up document retention via retention labels in SharePoint.

  1. Create Retention Labels (specify the retention period)
  2. Create and Publish Retention Policies (specify which sites the retention labels will be applied to)
  3. Label (tag) the content with Retention Labels

STEP 1: Create Retention Labels

With this step, all we are doing is specifying what the retention period will be for documents that will eventually be tagged with the label.

  1. Navigate to the New Compliance Center in Office 365: https://compliance.microsoft.com
  2. Click on Show all to expand all of the features
  3. Click on Information Governancedocument retention via retention labels in SharePoint
  4. You will now see the area that shows all the existing retention labels. I already have a few created, if this is a first time accessing it – it will be blank
  5. Click on Create a label to create a new retention labeldocument retention via retention labels in SharePoint
  6. Create the label name as well as a description, click Next. NOTE: Description for users text will come in handy later when the user tags the document as it will provide additional context/information on what will happen to items tagged with the label. Don’t skip it!
  7. On the next screen, toggle the Retention switch to On
  8. Once you toggle above switch to On, you will find the options to set up the retention label. In the first step, you can specify the retention period. Typically, you will keep the content for years, but you can also specify days or months. Since I am doing this here for this demo/tutorial and don’t feel like waiting for seven years for results, I am setting this up to retain content for just two days (because in 7 years I plan to win a lottery and live on a paradise island somewhere) 🙂document retention via retention labels in SharePoint
  9. Next, you need to specify what you want to do with the content at the end of the retention period (in our case, after two days). You can either delete it (will go to the Recycle Bin), trigger a disposition review (will send an email to a designated reviewer to decide on what to do with content) or leave the content as is (will leave the documents in the library and let the user delete it manually). For this demo, I will let it be deleted to show you what happens at the end of the retention period.
  10. Lastly, you have to specify how retention will be calculated (when the retention clock will start ticking). The choices are: When it was created (date the document uploaded to the library), when it was last modified, when it was labeled, an event. Different uses cases might prompt you to choose one over the other, but again, in our case, let’s keep it simple and choose when it was created. Click Nextdocument retention via retention labels in SharePoint
  11. You then get a screen where you can review the settings and adjust as necessary, click Create this label to create a label
  12. You will now see the label appear in the table/dashboard

STEP 2: Create a label Retention Policy

All we did in the previous steps was to create a label. We now need to tell SharePoint where this label will be applied (which SharePoint sites). To do this, we need to publish a Retention Policy. To do this:

  1. From the same Information Governance dashboard, click on Label Policies
  2. Next, click on Publish Labels
  3. On the next screen, click on Choose labels to publish
  4. Click Add
  5. Choose the label(s) you would like to apply to the policy. You can have multiple labels as part of a single policy. For example, a scenario would be, I want to have two labels available on a SharePoint site, one that will classify and keep content for seven years and one that would keep the document forever (so the user can choose which one to apple to a file). In our case, for simplicity purposes, I will select one label (Customer Record), we set up in STEP 1 above. Once you select the label(s), click Add
  6. Click Done
  7. Click Next document retention via retention labels in SharePoint
  8. On the next screen, we specify the location(s) where we want to publish our label. By default, it will publish it everywhere, but in most cases, you want to specify certain sites, groups, etc. – so make sure to click on Let me choose specific locations radio button
  9. In my case, I want to apply the label to just one site that is part of an Office 365 Group, so I unchecked all the other radio buttons/locations and chose Choose groups, so I can specify which Office 365 Group the label will be published to
  10. Click Choose groups
  11. Select the group and click Choose, then on the next screen click Done
  12. Click Next
  13. Provide a name and description (optional) for your policy, click Nextdocument retention via retention labels in SharePoint
  14. On the final review screen, it shows everything you have set up. If you are happy with everything, click Publish labelsdocument retention via retention labels in SharePoint
  15. You will now see your policy appearing in the policies dashboard
  16. If you click on the policy name again, you will see its status (Pending) – meaning that policy publishing to the sites is in progress. The retention labels will not show up in the SharePoint site until the policy is published – On (Success)
  17. It might take from a few minutes up to 24 hours to fully publish the label (depending on a SharePoint site or group you have chosen). Once that happens, when you go back to the Policy, you will see On (Success). That means that we successfully published the policy and retention labels are now available in the SharePoint Site.document retention via retention labels in SharePoint

STEP 3: Label Documents with a Retention Label

Well, honey, now it is the most exciting stuff. This is where we now tag the documents against the labels published.

  1. Tag the document as you would with any other metadata. Since we published the label to the site – you will now see it available in the document information panel. In my case, I also have other labels published, so in my case, you can see additional retention labels appearing in the drop-down below
  2. It always helps to have an additional column displayed – so you can see the retention label applied
  3. So now your library will look like this
  4. By the way, remember that optional description for the users we did in Step 1? When users hover over the label, they will get to see this additional information. So don’t skip it!

Just for the record, there are many ways to apply the retention label to a document. In the example above, I showed you the most basic one, where the retention label is applied at the file level. There are other ways to apply labels too – please check out this wonderful post/presentation from Joanne Klein.

What happens during the retention period?

  1. Since this is just the retention label and not a label that marks the document as a record, anyone with the Edit permission level (Members) can edit the document, just like they did it before.
  2. When the users try to delete a document during the retention period (2 days in our case), they will now get to see the following message: “The label that’s applied to this item prevents it from being edited or deleted. Check the item’s label for more details.”
  3. Any member of the site (those with the Edit privileges) will be able to assign or remove the retention label from the document, just like with any other piece of metadata

What happens after the retention period expires?

Well, you probably expected the files to be automatically deleted after the two days have gone by, did not you? And I expected Hillary Clinton to win the 2016 presidential election, but the reality is different, my friend.

The library looks the same a few days after the expiration of the retention policy. If you look at the screenshot belore, the files should have been deleted automatically two days after they were created, but yet, they are still here four days after being created. Moreover, when trying to delete them manually – you get the same error message as you did during the expiration period.

The reason for this is that Microsoft runs a weekly timer job behind the scenes that checks for all the documents that are affected by the retention policy and takes action at that point in time. Below is a screenshot from their article, proving what I just said. Moreover, the timing of this job cannot be changed.

Finally, six days after the expiration date of the label, the documents have disappeared from the library (got deleted and moved to the Recycle Bin).

At this point, they will follow the regular cycle of the Recycle Bin (will stay there for 93 days, then purged forever). This is it, my friend. Hopefully, you learned how to properly set up document retention via retention labels in SharePoint. Enjoy! As for me, it is time to head over to the kitchen for a shot of Hennessy!

You may also like

How to set a Retention Policy on a SharePoint site

October 15th, 2019

You may also like

An overview of compliance features in SharePoint and Office 365

September 25th, 2019

You may also like

How to set up retention and deletion policies for files and folders in SharePoint

June 1st, 2017

Need SharePoint Help?

Hourly consulting, training and configuration services are available

Learn More