Get governanceRoleAssignmentRequest

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.

Caution

This version of the Privileged Identity Management (PIM) API for Azure resources will be deprecated soon. Please use the new Azure REST PIM API for Azure resource roles.

Get a governanceRoleAssignmentRequest.

This API is available in the following national cloud deployments.

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

Permissions

The following table shows the least privileged permission or permissions required to call this API on each supported resource type. Follow best practices to request least privileged permissions. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

Supported resource Delegated (work or school account) Delegated (personal Microsoft account) Application
Microsoft Entra ID PrivilegedAccess.ReadWrite.AzureAD Not supported. PrivilegedAccess.Read.AzureAD
Azure resources PrivilegedAccess.ReadWrite.AzureResources Not supported. PrivilegedAccess.Read.AzureResources
group PrivilegedAccess.ReadWrite.AzureADGroup Not supported. PrivilegedAccess.Read.AzureADGroup

The requester must also have at least one active role assignment on the resource or must be the subject of the governanceRoleAssignmentRequest.

HTTP request

GET /privilegedAccess/azureResources/roleAssignmentRequests/{id}

Optional query parameters

This method supports the OData Query Parameters to help customize the response.

Request headers

Name Description
Authorization Bearer {code}

Request body

Don't supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and a governanceRoleAssignmentRequest object in the response body.

Example

Get a role assignment request

Request
GET https://graph.microsoft.com/beta/privilegedAccess/azureResources/roleAssignmentRequests/e68ff888-4af5-4ccb-8b74-39156090344b
Response
HTTP/1.1 200 OK
Content-type: application/json

{
  "@odata.context":"https://graph.microsoft.com/beta/$metadata#governanceRoleAssignmentRequests/$entity",
  "id":"e68ff888-4af5-4ccb-8b74-39156090344b",
  "resourceId":"ec3a00f7-81dc-43b3-bbe7-650d3a5f7d46",
  "roleDefinitionId":"be0767b9-2c31-4b0d-b820-726228e7ff5c",
  "subjectId":"a4c5a837-b546-4ec5-a7df-e61547a46a4b",
  "linkedEligibleRoleAssignmentId":"",
  "type":"AdminRemove",
  "assignmentState":"Eligible",
  "requestedDateTime":"2018-05-09T21:26:15.73-07:00",
  "reason":null,
  "status":{
    "status":"Closed",
    "subStatus":"Revoked",
    "statusDetails":[]
  },
  "schedule":null
}