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)
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:
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
Step 2: Remove the label either thru the UI or with PowerShell
Thru the User interface:
With PowerShell:
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.
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)
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.
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:
Trying to brute-force a delete thru PowerShell will not work either:
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
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.
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
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
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
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
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
Great article Joanne, I was just about add a suggestion on user voice for deleting a record label, however you’ve already done. So voted 🙂
Awesome!!! 🙂
I also voted!
Hello Joanne, I wrote a blog on how to get a record label deleted. You can’t do this yourself but you can open a support ticket with Microsoft to remove the record flag from your label. They do this in the backend. After they completed removing the flag they you can remove the label. Here is the link: https://www.linkedin.com/pulse/deleting-microsoft-365-record-retention-label-marc-de-kleijn/
Thanks for sharing Marc! I’ll add a link to your post from within mine!
Hi Joanne,
Great post (like all the others on your site). Just a caveat on reusing a deleted label. We did that and had problems. Only some of the published labels were showing up for users. We opened a ticket with Microsoft and after considerable digging they found that the missing labels were bound to the deleted policy, not the live (new) version. So DON’T reuse names if at all possible. I realize this scenario is a bit different from Peris’ scenario (policy vs label) but I’d still recommend against re-using labels or policies with identical names.
Solid advice Gregg.
Could you please let me know how to remove retention label from a document in SharePoint online.
Hi Amit, you view the details pane for the document and select ‘none’ for the ‘Apply retention label’ metadata property.
-JCK
Hi! How can i resolve this process for multiple items (folder, subfolder, files) in one step?
Hi Polgar, you can select multiple items/folders and clear the retention label. Caveat to this: if you don’t have at least contribute permission to the list, you won’t be able to do this. If the Retention label has declared the document a record, you may not be able to do it in bulk.
-Joanne
How can chose the “None” (clear the label) to a folder and all subfolder and subitem in sharepoint site?
I cant find resolution for this.
Nice blog Joanne, thanks for sharing!