Forum Discussion

anandglucid's avatar
anandglucid
Copper Contributor
Oct 20, 2021
Solved

Identifying Sensitivity labels using Purview APIs

Appreciate any inputs on the below:

1. I created a sensitivity label in the MS Compliance center following steps in https://docs.microsoft.com/en-us/azure/purview/how-to-automatically-label-your-content#create-or-extend-existing-sensitivity-labels-to-azure-purview

2. Now when I scan a file in Purview, it does apply the label for one of the files satisfying the criteria (has SSN data)

3. Now when I use the GET Entity by guid REST API, I get the below classification section indicating the label details 

This has no reference to the sensitivity label name nor indicates that is a sensitivity label. Given that this is in the 'classification' section, how do we differentiate this from other classifications. How do we match it with the name? 

 

 

  • anandglucid 

    I figured out a way to get the sensitivity label name. What was displayed as part of the GET Entity by Guid response was its name 'Microsoft.Label.B3DB3A6A_84EB_4D67_8965_D8D21FD38F1B'. The display name for it can be got by using the GET {Endpoint}/catalog/api/atlas/v2/types/classificationdef/name/{name} endpoint. I get the below response:

     

1 Reply

  • anandglucid's avatar
    anandglucid
    Copper Contributor

    anandglucid 

    I figured out a way to get the sensitivity label name. What was displayed as part of the GET Entity by Guid response was its name 'Microsoft.Label.B3DB3A6A_84EB_4D67_8965_D8D21FD38F1B'. The display name for it can be got by using the GET {Endpoint}/catalog/api/atlas/v2/types/classificationdef/name/{name} endpoint. I get the below response:

     

Resources