Office 365 security & compliance & How to delete a label that is marked as record

New Contributor

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 -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
IRemove-ComplianceTag -Identity "mytestlabel"
Remove-PSSession $Session
6 Replies

Oh! 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.

Just walked into this trap myself.
Not impressed.

Microsoft 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. 


So nice! So I made a typo and now we'll have to live with it on the tenant for ever. Clever, very clever!

@Eric 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.