Deleting an Office 365 Retention Label

Blog post: 3 minute read

If your organization is using the Security & Compliance retention labels to apply retention across Office 365 workloads,  you may eventually find yourself needing to remove an existing label definition for one reason or another. Perhaps you had a label set up for a test scenario and now want to remove it, or maybe the Information Management team changed their mind on the retention label configuration and want some labels to be removed. This is real-world, it happens.

This post is NOT referring to Azure Information Protection labels. Deleting them is a completely different process.

This post is referring to removing a label definition from the Security & Compliance Center, NOT removing a label from a document.

Although deleting a label definition sounds like a trivial thing to do, depending on your exact scenario, the behavior can be a little confusing. As an administrator, you need to understand it.

Scenarios

  • You’ve created the label and haven’t published it in a policy yet
  • You’ve created the label, published it in a policy, but haven’t applied it to content yet
  • You’ve created the label, published it in a policy, and applied it to content
  • Special mention: above but with a RECORD label

I’ll go thru each of these scenarios and conclude with my recommendation for removing retention labels. 🙂


Scenario 1: Created a label, not yet published

The first scenario is the simplest to address. Simply edit the label and select the Delete label option. No fuss, no muss. (UNLESS the label declared content as a record – for this, check out scenario 4)

DeleteNeverUsedLabel

Note: if you do delete a label like this, it takes a while for it to be completely removed from the system. If you try to immediately recreate a label with the same name, it will throw an error saying the label already exists. My testing has shown it takes ~1 day for it to be completely removed.


Scenario 2: Created a label, published it, but not used on content

I’ve created a label called Joanne Label 1 and included it in a Retention policy published to all locations in my tenant.

If you try to delete the label directly thru the UI (Classifications section in the Security & Compliance Center) or via PowerShell with the Remove-ComplianceTag cmdlet, you will get the error message(s) below:

Removing a label in use

Removing a label in use with PowerShell

Note: for these cmdlets, connect to the Security & Compliance Center. Instructions

You receive this error because the label is part of a retention policy and even though I haven’t applied the label to any content yet, it is technically “in-use”. It is a 2-step process to delete it.

Step 1: Remove the label from the policy OR delete the policy if the label was the only one in the policy

Remove label from PolicyStep 2: Remove the label either thru the UI or with PowerShell

Thru the User interface:

DeleteNeverUsedLabel

With PowerShell:

Remove a label not in use


Scenario 3: Created a label, published it, applied it to content

To demonstrate this scenario, I’ve created a label, Joanne Label 1, published to all locations across my tenant, and uploaded some documents into a library on a modern team site, Label Test Site. I’ve applied the label to 3 documents.

Labeled Documents

If I try to delete the retention label, I will receive the same error as described in Scenario 2 above. I need to go thru the same steps to remove it:

Step 1: Remove the label from the policy OR delete the policy if the label was the only one in the policy.

Step 2: Remove the label either thru the UI or with PowerShell

But wait! What does this mean for content that has the label applied? Nothing for the time being… the label goes into a Pending Deletion state. Although for a time, existing content will retain the retention label applied, it will eventually be removed by a timer process running in the background. This process will clear the retention label from any content that had it applied. For testing I’ve done, this process can take several hours to complete.

You can confirm this by doing a Content search in the Security & Compliance Center filtering on the Compliance tag and the label you’re wanting to remove (image). (Reference: Where’s my Office 365 Retention Label applied?)

By searching across All Locations, you can find out exactly where the label was applied. (Exchange email, SharePoint sites, OneDrive accounts, Office 365 groups)

ContentSearch

It may take several hours, but eventually the timer process will clear the retention label from any content it was applied to and the search query will return 0 results.


Scenario 4: Created a RECORD label

If you’ve checked the box to classify content tagged with label as a “Record” (image), you will NOT be able to delete it once it’s created. This holds true whether the label has been published in a retention policy or not OR applied to content or not.

Label classified as Record

If the record label was applied to content, this will prevent anything deemed as a record to have its label removed so deleting the label definition will not remove it from the content it’s been applied to. Whatever rules were defined for the label will still be adhered to. For example, if the content was to be declared a record and then deleted after 7 years, it would be. Only the site collection administrator can remove or change a record label once it’s applied which is how you could remove/change the label if required.

The Delete label button is disabled:

DeleteRecordLabel

Trying to brute-force a delete thru PowerShell will not work either:

Removing a Record label with PowerShell

If you no longer wish to use the record label for new content, remove it from the retention policy(s) it’s published in. This will remove it from the Apply label dropdown in the UI for end-users, however existing content with the label applied will remain intact.

Note: To my knowledge, currently there is no way to delete a label once the record checkbox has been selected even if it hasn’t been applied to any content.


My Recommendation

It’s important to understand where a retention label is being used across Office 365 locations BEFORE deleting it. The best way to do this is using the Content Search feature in the Security & Compliance Center.

Based on your retention requirements, you can either allow the Timer process to complete and clear the retention label you want deleted or, based on the search results, proactively apply a different label prior to deleting it.

Thanks for reading.

-JCK


Credit: Photo by Matija Mestrovic on Unsplash

7 comments

  1. In SharePoint, a site collection administrator aka Group Owner can remove or change a record label on an item. In OneDrive, its user is the site collection administrator so record labels are not as fixed as first appears.

    1. Hi Keith,
      I added that clarification in my post. Thank you! Although the applied label can be removed/changed, the label definition from the S&C center cannot be. (at least I couldn’t find a way)
      -JCK

  2. Hello Joanne,

    Luckily I had the easy scenario and deleted my label without hassle. I tried to create a new one with the same name as the deleted one and the system won’t let me since “This value already exists”. Have you come across this problem? Is there a recycle bin for labels that needs to be emptied first?

    Thank you

    1. Hi Peris, I just tried it and receive the same error message. There’s no recycle bin. Not sure if this is by design or a bug. You may want to open a ticket with Microsoft to confirm. I will update the post with this detail – thanks for pointing it out.
      -JCK

      1. Thank you for your reply Joanne. I thought I would give it some time and try after a day or two and as suspected it worked. It could possible take some time to propagate the deletion of the label. Could you also give it a try the next day? Just for confirmation.

        Kind Regards,
        Peris

      2. Hi Peris, Same for me… I waited a couple of days and was able to re-add a same-named classification label! I’ll update the post with this detail.

        Thanks for sharing!
        JCK

Leave a Reply to Peris Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.