SensitivityLabel.Read
Allows the app to get sensitivity labels.
Permission Details
Get labels application scope.
Allows the app to get sensitivity labels.
3b8e7aad-f6e3-4299-83f8-6fc6a5777f0b
Get labels user scope.
Allows the app to get sensitivity labels.
1aeb73ce-68d7-49b7-913a-eedc80844551
Properties
Properties is shown from stable Microsoft Graph v1.0 metadata.
| Property | Type | Description |
|---|---|---|
actionSource |
object |
|
autoTooltip |
stringNullable |
|
description |
stringNullable |
|
displayName |
stringNullable |
|
hasProtection |
booleanNullable |
|
id |
string |
The unique identifier for an entity. Read-only. |
isDefault |
booleanNullable |
|
isEndpointProtectionEnabled |
booleanNullable |
|
isScopedToUser |
booleanNullable |
|
locale |
stringNullable |
|
name |
stringNullable |
|
priority |
int32Nullable |
|
rights |
object |
|
sublabels |
sensitivityLabel collection |
|
toolTip |
stringNullable |
JSON Representation
JSON representation is shown from stable Microsoft Graph v1.0 metadata.
{
"actionSource": {
"sample": "value"
},
"autoTooltip": "String",
"description": "String",
"displayName": "String",
"hasProtection": true,
"id": "String",
"isDefault": true,
"isEndpointProtectionEnabled": true,
"isScopedToUser": true,
"locale": "String",
"name": "String",
"priority": 0,
"rights": {
"sample": "value"
},
"sublabels": [
{
"@type": "sensitivityLabel",
"id": "00000000-0000-0000-0000-000000000000"
}
],
"toolTip": "String"
}
Relationships
Relationships is shown from stable Microsoft Graph v1.0 metadata.
| Relationship | Type | Description |
|---|---|---|
sublabels |
sensitivityLabel collection |
Related sublabels data exposed by this resource. |
Graph Methods
Microsoft Graph v1.0 endpoints are mapped directly from refreshed Microsoft Learn permissions tables.
Microsoft Graph beta endpoints are mapped directly from refreshed Microsoft Learn permissions tables.
Microsoft Graph PowerShell v1.0 commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.
Microsoft Graph PowerShell beta commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.
Code Examples
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Security.DataSecurityAndGovernance.SensitivityLabels["{sensitivityLabel-id}"].GetAsync((requestConfiguration) =>
{
requestConfiguration.Headers.Add("Authorization", "Bearer {token}");
requestConfiguration.Headers.Add("Client-Request-Id", "a0b9c8d7-e6f5-a4b3-c2d1-e0f9a8b7c6d5");
});
const options = {
authProvider,
};
const client = Client.init(options);
let sensitivityLabel = await client.api('/security/dataSecurityAndGovernance/sensitivityLabels/4e4234dd-377b-42a3-935b-0e42f138fa23')
.header('Authorization','Bearer {token}')
.header('Client-Request-Id','a0b9c8d7-e6f5-a4b3-c2d1-e0f9a8b7c6d5')
.get();
Import-Module Microsoft.Graph.Security
Get-MgSecurityDataSecurityAndGovernanceSensitivityLabel -SensitivityLabelId $sensitivityLabelId
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.security.data_security_and_governance.sensitivity_labels.item.sensitivity_label_item_request_builder import SensitivityLabelItemRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_configuration = RequestConfiguration()
request_configuration.headers.add("Authorization", "Bearer {token}")
request_configuration.headers.add("Client-Request-Id", "a0b9c8d7-e6f5-a4b3-c2d1-e0f9a8b7c6d5")
result = await graph_client.security.data_security_and_governance.sensitivity_labels.by_sensitivity_label_id('sensitivityLabel-id').get(request_configuration = request_configuration)
App Registration
Navigate to Azure Portal
Go to App registrations in Microsoft Entra admin center
Add API Permission
Select your app → API permissions → Add a permission → Microsoft Graph
Select Permission Type
Choose Application permissions or delegated permissions and search for SensitivityLabel.Read
Grant Admin Consent
Application permissions always require admin consent.