Forum Discussion

Pasi Pohjola's avatar
Pasi Pohjola
Copper Contributor
Oct 24, 2017

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

    • Eric Beaudry's avatar
      Eric Beaudry
      Copper Contributor

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

      • COSManager's avatar
        COSManager
        Copper Contributor

        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.

    • Noel Rooney's avatar
      Noel Rooney
      Copper Contributor

      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. 

    • SPhuman's avatar
      SPhuman
      Copper Contributor

      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.

Resources