Get governanceRoleDefinition

Namespace: microsoft.graph


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.


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.

Retrieve the properties and relationships of a governanceRoleDefinition.

This API is available in the following national cloud deployments.

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


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 requestor must also have at least one role assignment on the resource which the governanceRoleDefinition belongs to.

HTTP request

GET /privilegedAccess/azureResources/resources/{resourceId}/roleDefinitions/{id}
GET /privilegedAccess/azureResources/roleDefinitions/{id}?$filter=resourceId+eq+'{resourceId}'

Optional query parameters

This method does not support 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.


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


This example shows how to get details of role definition DNS Zone Contributor in the subscription Wingtip Toys - Prod.

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

    "@odata.context": "$metadata#governanceRoleDefinitions/$entity",
    "id": "00efc9e0-1b96-4e9a-99a3-a3df0735cf88",
    "resourceId": "e5e7d29d-5465-45ac-885f-4716a5ee74b5",
    "externalId": "/subscriptions/38ab2ccc-3747-4567-b36b-9478f5602f0d/providers/Microsoft.Authorization/roleDefinitions/befefa01-2a29-4197-83a8-272ff33ce314",
    "templateId": "befefa01-2a29-4197-83a8-272ff33ce314",
    "displayName": "DNS Zone Contributor"