Forum Discussion
Office 365 security & compliance & How to delete a label that is marked as record
I created a few test labels. I am able to delete all labels except label that has been marked as a record. Following powershell code gives an error: "You cannot remove the compliance label because the tag is record label."
How can I delete my label?
Set-ExecutionPolicy RemoteSigned $UserCredential = Get-Credential $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.compliance.protection.outlook.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection Import-PSSession $Session IRemove-ComplianceTag -Identity "mytestlabel" Remove-PSSession $Session
6 Replies
- As noted in the documentation, record labels cannot be removed or edited: https://support.office.com/en-us/article/Overview-of-labels-af398293-c69d-465e-a249-d74561552d30#records - Eric BeaudryCopper ContributorSo nice! So I made a typo and now we'll have to live with it on the tenant for ever. Clever, very clever! - COSManagerCopper ContributorEric Beaudry There is nothing in Microsoft's actual documentation (link provided above) that suggests the label cannot be deleted. It talks specifically about items that have been declared as a record. So the label should be able to be deleted. MS needs to fix this ASAP. 
 
- Noel RooneyCopper ContributorMicrosoft really needs to change the way they describe them in the actual settings as well. You generally think that "users" are by default not inclusive to the Administrators in terms of permissions. The assumption (I know &$$ out of you and me) was that I would apply this label to an item and it would prevent a user from deleting the content accidentally. Not that the label itself would be prevented from deletion by the administrator. 
- SPhumanCopper ContributorOh! And here I was thinking "A record can’t be modified or deleted" would not apply since I am not actually published my label. No warning whatsoever. Microsoft will have many happy customers using their production tenant as a test-bed for labels. It's a good thing I used a test tenant. - Paul MaskellCopper ContributorJust walked into this trap myself. 
 Not impressed.