SOLVED

Identifying Sensitivity labels using Purview APIs

Copper Contributor

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

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)

anandglucid_0-1634728115308.png

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

anandglucid_1-1634728202317.png

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? 

 

 

1 Reply
best response confirmed by anandglucid (Copper Contributor)
Solution

@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:

anandglucid_0-1634811269481.png

 

1 best response

Accepted Solutions
best response confirmed by anandglucid (Copper Contributor)
Solution

@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:

anandglucid_0-1634811269481.png

 

View solution in original post