Edit

Share via


Get usageRightsIncluded

Namespace: microsoft.graph

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Get the usage rights granted to the calling user for a specific sensitivity label that has admin-defined permissions.

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated permissions, see Permission types. To learn more about these permissions, see the permissions reference.

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) SensitivityLabel.Read SensitivityLabels.Read.All
Delegated (personal Microsoft account) Not supported. Not supported.
Application SensitivityLabel.Read SensitivityLabels.Read.All

HTTP request

GET /security/dataSecurityAndGovernance/sensitivityLabels/{labelId}/rights

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Client-Request-Id Optional. A client-generated GUID to trace the request. Recommended for troubleshooting.

Optional query parameters

This method supports some of the OData query parameters to help customize the response. For general information, see OData query parameters.

Request body

Don't supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and a collection of usageRight enum values in the response body, representing the rights granted to the user for the specified label.

If the label is not found, doesn't have admin-defined protection, or the user doesn't have the VIEW right, the API might return an error response (for example, 403 Forbidden or 404 Not Found) with details in an error object.

Examples

Request to get the rights for a specific sensitivity label for the user 4e4234dd-377b-42a3-935b-0e42f138fa23

Request

GET https://graph.microsoft.com/beta/security/dataSecurityAndGovernance/sensitivityLabels/4e4234dd-377b-42a3-935b-0e42f138fa23/rights?ownerEmail=bob@contoso.com
Authorization: Bearer {token}
Client-Request-Id: 7c9b1b4c-5b5a-4e3e-9f1b-2d9b0b4a9a0a

Response

The following example shows the response containing the usage rights granted to the user.

HTTP/1.1 200 OK
Content-Type: application/json

{
  "@odata.context": "https://graph.microsoft.com/beta/$metadata#Collection(microsoft.graph.usageRight)",
  "id": "f306e677-4c14-4136-b2c3-d9c7dd448cc1",
  "ownerEmail": "bob@contoso.com",
  "value": "docEdit, edit, forward, print, reply, replyAll, view, extract, viewRightsData, objModel"
}