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.
Official link from Microsoft: Delete retention labels
Warning: Neither an event-based retention label nor a regulatory record label can be deleted. Period.
- 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. Any retention label not yet published will have a status of “Inactive”. 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:
Scenario 3: Created a label, published it, applied it to content
[UPDATE July 7, 2022] The updated documentation from Microsoft (Delete retention labels) has changed this behavior. According to documentation, you cannot delete a retention label (non-record) if it has been applied to content anywhere across your tenant. My testing has shown that you can. I will retest and update this post when I have reverified results. The takeaway… if your experience is different than what I’m showing here, then your tenant has the updated code as documented in the link. Also, thanks to a reader, there is a delay between when you remove the label off content and when you will be allowed to delete the retention label.
[This to be verified again…] 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
Recent changes now allow you to delete a RECORD retention label (checkbox below when you’re creating the retention label) after it’s created UNLESS it has been applied to content. Previously, this was not possible. Similar to a regular retention label, you can now delete it if it has not been published or auto-applied in a label policy.
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.
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 or Data Classification feature in the Microsoft Purview 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.
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.
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)
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?
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.
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.
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!
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 🙂
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!
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.
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.
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!
Hi Joanne, I realize this post pertains to deleting, but I’ve been very unsuccessful in renaming retention labels or modifying retention duration using the UI. Any advice on modifying labels in this way that have already been applied to documents? Thanks!
You can’t rename a retention label after it’s been defined. Depending on the label configuration you *also* can’t change the retention duration… specifically if the retention label is based of “when an item is labeled”, you can’t currently adjust the retention duration. My advice? No easy path to work around this – you will need to re-apply a different label with the correct settings (which may not be an option depending on your specific scenario and your retention label settings).
Thanks so much Joanne!
Hi Joanne, thank you for posting this very helpful Blog. I do have a question regarding Microsoft 365 Compliance and existing Labels that are applied to a Global Retention Policy.
Policy and Labels were created some time ago for testing however a handful of users have tagged content with the test Labels.
We wish to preserve the settings of each applied Label but remove visibility to anyone new applying.
Is this achieved by disabling the Legacy Policy or removing the labels from the Policy but don’t delete?
I’m not certain if the below article (Removing or deleting a retention tag from a retention policy) applies for modern Labels / Polices?
In summary we wish to retire legacy Policy and Labels, Crete New Policy and Labels but present only one set (New) for the end user to manually tag their content.
That post refers to Retention tags in Exchange and not the modern retention labels defined in the Compliance Center so the guidance in that article is not what you’re looking for. The new guidance is here (https://docs.microsoft.com/en-us/microsoft-365/compliance/retention?view=o365-worldwide#releasing-a-policy-for-retention) although it doesn’t explicitly cover your scenario if you want to continue to have those labels applied and retaining while removing them from the published policy. It may be ok, but it may not – I simply haven’t tested it.
In full transparency, I haven’t had to do this… I’d have to investigate and test more and I don’t have the cycles to do that. Testing your scenario in a demo environment is recommended.
A thought… is the old “test” label based off of ‘Created date’ or ‘Last modified date’? If it is, then one option is to relabel it with the new label you publish to your locations as it will maintain the same retention period. If it was based off of the ‘Labeled date’, then you wouldn’t be able to do this however.
Please let me know how it goes.
Hi again Stuart,
I just ‘disabled’ a label policy that had 1 retention label in it with content applied within a doc library on a M365 Group site. The retention label no longer shows in the label dropdown in SharePoint and existing content that had the label applied continues to have the label applied.
I believe it should be ok since that label will persist. Please verify with your own testing though.
Hi Joanne, love your blog!
I wonder if you have come across a retention label that does not have the ‘delete’ button visible? There are no published polices for any of my labels and the other labels do have the delete button visible. The problematic policy in question is event driven, whereas the others are not. but I want to change it to ‘last modified date’ which requires the label to be deleted and recreated, which I am unable to do.
Does your event-based label ALSO declare the item as a record? If it does, that is a current limitation. Whether you’re using the retention label or not, you cannot delete it. I believe this is on the roadmap to allow though. If it isn’t a record, you cannot change an event-based label to a non-event based label (based on last modified date as you state). You will have to create a new label in this case with your new configuration.
Hi Joanne, thank you for your quick reply, and taking the time to test. Unfortunately I missed your post , but did speak to Microsoft regarding this scenario and whilst we couldn’t remove the label (there has to be one applied to the policy) they seem confident we can disable the policy without impacting the end user (less risky option). It has been requested that we create All new labels and policy settings based on different requirements. It was at this point I thought we should start from fresh given the history of this 1 legacy Policy that unfortunately does not fit the brief. If I encounter any issues I will post an update . Thanks again 🙂
Have you ever run into a situation where the labels don’t remove themselves in Scenario 3? We have thousands of messages that had a retention label auto-applied, however the label is still there months after deleting the policy and label. MS support seems baffled…
Hey Dave – Full transparency, I haven’t tested every possible permutation of deleting a label. Your question is way too light on detail for me to respond in a helpful way. I wouldn’t be able to help without more. I’m not promising I’ll have the insight to help, and I don’t have the tools to look at your tenant like support does.
– what’s the workload?
– are the messages removed?
– where are you seeing the label
– what are the settings for the label
Update on this: MS support confirmed that it was a bug that they have to remediate. The symptoms are that a mailbox has “compliancetagholdapplied” set to true, but “inplaceholds” is blank.
Thank you for the useful posting.
I have a question, which I cannot find an answer.
Is there a way to delete in bulk folders or document libraries containing documents with labels applied to?
Is there a way via UI or PowerShell or may be Flow to delete the whole folder or whole document library with labels applied to some documents (i.e. NDA)?
Or if not – is there a way to run a PowerShell script or a flow (and how) to clear the labels in bulk – against folder or Doc. library and then delete it – in bulk again?
Depends. What are the settings for your retention label? If they are regulatory, you can’t remove the label nor delete the doc. If there is any kind of a retention component to the label, then you will NOT be able to delete it without it going into the preservation hold library(phl) on the site (this also depends on the new tenant level setting that will allow deletion, but will send the docs to the phl). If you just want to permanently delete them, you have to remove the retention label first and then delete it. There are several ways of programmatically clearing a retention label: REST API, PnP PowerShell that you could use in either a custom script that you would have to build or build a Flow to clear it – there is nothing out-of-the-box to provide this capability.
Link for PnP: https://pnp.github.io/powershell/cmdlets/Set-PnPLabel.html
Thanks very much for this blog, it has really helped with understanding different use cases.
Please can you help with this questions :
1 How will user see content that will be deleted? That is, contents whose retention is running out
2.Document Library- Can a user bulk label or/and can admin help out –Bulk publishing and unpublishing
3.Is there a way to make the Retention column available for all users in sharepoint without manually going through settings-edit view
4. How will we detect all items attached to a policy and how will we disassociate them
Thanks in advance!
1. I believe you’re talking about content being deleted and not the retention label itself which is what this post is talking about. If a retention label was applied to content and t had a disposition review, then it wouldn’t be automatically deleted, it would show in the Pending dispositions tab in the Compliance Center. Disposition reviewers will see that. An end user working in the library won’t know when the content will be deleted. If you had a retention policy (instead of a retention label) published to a SP site, then an end-user has no way of see what content will be deleted.
2. A retention label can be applied in bulk in a SharePoint library similarly to how you can bulk label metadata. Similarly, you can set a retention label to none in bulk as well unless the retention label marks content as a record or regulatory record.
3. No. That would be a customization done thru code… a custom provisioning solution for example.
4. What kind of policy? Label policy or retention policy? Assuming you mean retention policy… there’s no way thru the SharePoint UI to know which items are attached to a retention policy. There is a feature in the Purview Compliance Center to show *which* sites are included in a retention policy, but it will only show the site name and not the individual items. All content in a SP site is affected by the retention policy. (documents anyway… there may be some exceptions)
Hope this was helpful.
For “Scenario 4: Created a RECORD label” do you know if the change in the retention label checkbox is a preview or is it being push out for the GA (don’t see this change yet in my tenants)?
Scenario 3: Created a label, published it, applied it to content
Things seem to be different (now) that what is described above; I find that the label cannot be deleted if it has been applied to any content. Also, after removing the label from all content, it seems that some time must pass before the label can be deleted.
From the docs (https://docs.microsoft.com/en-us/microsoft-365/compliance/file-plan-manager?view=o365-worldwide#delete-retention-labels): “For retention labels that you can delete, if they’ve been applied to items, the deletion fails and you see a link to content explorer to identify the labeled items.”
Hi Jim, this functionality has recently changed so thanks for the heads up on the outdated post!
I’m running some tests on a few tenants to confirm. Will update the post to reflect.
Scenario 3: Created a label, published it, applied it to content
How has anyone else been able to get on with this? We have legacy Retention Labels scattered across our tenant which we would like to delete/remove. Does deleting the label(s) and/or policy still work in people’s experience since the functionality change?
Good morning, Joanne,
Thanks for the article, I realise it was published some time ago, but I’ve only just now read it.
I was wondering if you could produce a similar guide for Information Protection labels. How would we go about removing a sensitivity label from multiple documents or all documents in OneDrive or a SharePoint site/library?