Create delegatedPermissionClassification

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.

Classify a delegated permission by adding a delegatedPermissionClassification to the servicePrincipal representing the API.

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) Policy.ReadWrite.PermissionGrant
Delegated (personal Microsoft account) Not supported.
Application Policy.ReadWrite.PermissionGrant

HTTP request

POST /servicePrincipals/{id}/delegatedPermissionClassifications

Request headers

Name Description
Authorization Bearer {token}. Required.
Content-type application/json. Required.

Request body

In the request body, supply a JSON representation of an delegatedPermissionClassification object.

Response

If successful, this method returns a 201 Created response code and an delegatedPermissionClassification object in the response body.

Examples

Request

In the following example, the delegated permission "User.Read" is being classified "low".

POST https://graph.microsoft.com/beta/servicePrincipals/{id}/delegatedPermissionClassifications
Content-Type: application/json

{
  "permissionId": "e1fe6dd8-ba31-4d61-89e7-88639da4683d",
  "permissionName": "User.Read",
  "classification": "low"
}

Response

The following is an example of the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 201 Created
Content-type: application/json

{
  "id": "2G3-4TG6YU2J54hjnaRoPQE",
  "permissionId": "e1fe6dd8-ba31-4d61-89e7-88639da4683d",
  "permissionName": "User.Read",
  "classification": "low"
}