Thank you for posting your query on Microsoft Q&A, from above description I could understand that you are trying to get sensitivity label "Name" with ID in the output of when PowerBI Scanner API is called.
Please do correct me if this is not the case by responding in the comments section.
- The GetScan API would always return the labelID as info of sensitivity label as that is the only info captured in this parameter.
- You may use List sensitivityLabels to map the labelid with names.
GET https://graph.microsoft.com/beta/users/******@contoso.com/security/informationProtection/sensitivityLabels
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#users('bob%40contoso.com')/security/informationProtection/sensitivityLabels",
"value": [
{
"id": "0d39dc11-75ff-4309-8b32-ff94f0e41607",
"name": "Any User (No Protection)",
"description": "",
"color": "",
"sensitivity": 7,
"tooltip": "The most sensitive information stored by Milt0rCorp; product plans, customer information, and other trade secrets. Data labeled for Any User will not be protected and should be used with caution and sparingly.",
"isActive": true,
"isAppliable": true,
"contentFormats": [
"file",
"email",
"schematizeddata"
],
"hasProtection": false,
"parent@odata.context": "https://graph.microsoft.com/beta/$metadata#users('bob%40constoso.com')/security/informationProtection/sensitivityLabels('0d39dc11-75ff-4309-8b32-ff94f0e41607')/parent/$entity",
"parent": {
"id": "566663c7-4d8d-4b8f-b280-784a31971dbe",
"name": "Highly Confidential",
"description": "",
"color": "",
"sensitivity": 7,
"tooltip": "The most sensitive information at Milt0rCorp; product plans, customer information, data not shareable even under NDA.",
"isActive": false,
"isAppliable": false,
"contentFormats": [
"file",
"email",
"schematizeddata"
],
"hasProtection": false,
"parent@odata.context": "https://graph.microsoft.com/beta/$metadata#users('bob%40contoso.com')/security/informationProtection/sensitivityLabels('0d39dc11-75ff-4309-8b32-ff94f0e41607')/parent/parent/$entity",
"parent": null
}
}
]
}
Thanks,
Akshay Kaushik
Please "Accept the answer" (Yes), and share your feedback if the suggestion answers you’re your query. This will help us and others in the community as well.