Microsoft Secure Tech Accelerator
Apr 03 2024, 07:00 AM - 11:00 AM (PDT)
Microsoft Tech Community

Cannot find Sensitivity ID to apply a label with PowerShell

Copper Contributor

Hi everyone,

I created and publish Sensitivity labels the followings:

 

Sensitivity.JPG

And I use Powershell to apply Sensitivity as the following:

errorSenti.JPG

I can get ID but I use this ID to apply Sensitivity label then has the error above.

I use : Set-AIPFileLabel -Path D:\DocumentTest\ -LabelId 7de79cc8-8618-4629-97dc-981860a8f817

Error : Set-AIPFileLabel : Can't find label ID: 7de79cc8-8618-4629-97dc-981860a8f817

Please help me resolve this error.

Thank you,

John

1 Reply
Have you checked if the label is included in the Labelpolicy by using the Get-LabelPolicy cmdlet? (https://docs.microsoft.com/en-us/powershell/module/exchange/get-labelpolicy?view=exchange-ps)