Azure-RMSDocs
Azure-RMSDocs copied to clipboard
SetLabel Error: Calling principal is forbidden to perform the operation
as title, I run below code , when the labelId is a label bind Protection , error occured at commonAsync : Calling principal is forbidden to perform the operation; if labelId is a label with no protect , it works~
code: handler.SetLabel(fileEngine.GetLabelById(labelId), labelingOptions, new ProtectionSettings()); var result = Task.Run(async () => await handler.CommitAsync(outputFilePath)).Result; // error occured~
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
- ID: 46b0a2b2-7502-f245-9d9b-4bf566633065
- Version Independent ID: f7f5635e-44ec-c1cc-ac35-2ecf57790248
- Content: Quickstart - Set and get a sensitivity label on a file using the C# MIP SDK
- Content Source: mip/develop/quick-file-set-get-label-csharp.md
- Service: information-protection
- GitHub Login: @msmbaldwin
- Microsoft Alias: mbaldwin