List governanceRoleSettings
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.
Retrieve a collection of governanceRoleSettings on a resource.
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 requestor must also have at least one role assignment on the resource.
HTTP request
GET /privilegedAccess/azureResources/resources/{resourceId}/roleSettings
GET /privilegedAccess/azureResources/roleSettings?$filter=resourceId+eq+'<resourceId>'
Optional query parameters
This method supports the OData query parameters to help customize the response.
Request headers
Name | Description |
---|---|
Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Request body
Don't supply a request body for this method.
Response
If successful, this method returns a 200 OK
response code and collection of governanceRoleSetting objects in the response body.
Example
This example shows how an administrator lists role settings for the resource Wingtip Toys - Prod.
Request
GET https://graph.microsoft.com/beta/privilegedAccess/azureResources/resources/e5e7d29d-5465-45ac-885f-4716a5ee74b5/roleSettings
Response
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#governanceRoleSettings",
"value": [
{
"id": "80dc5d6f-8d89-47b3-953f-01dc909ed3f9",
"resourceId": "e5e7d29d-5465-45ac-885f-4716a5ee74b5",
"roleDefinitionId": "5b8bea96-e9f6-4c63-a8e9-fb092c79f0a1",
"isDefault": false,
"lastUpdatedDateTime": "2018-03-26T21:21:43.113Z",
"lastUpdatedBy": "Alex Wilber",
"adminEligibleSettings": [
{
"ruleIdentifier": "ExpirationRule",
"setting": "{\"permanentAssignment\":false,\"maximumGrantPeriodInMinutes\":129600}"
}
],
"adminMemberSettings": [
{
"ruleIdentifier": "ExpirationRule",
"setting": "{\"permanentAssignment\":false,\"maximumGrantPeriodInMinutes\":43200}"
},
{
"ruleIdentifier": "MfaRule",
"setting": "{\"mfaRequired\":false}"
},
{
"ruleIdentifier": "JustificationRule",
"setting": "{\"required\":true}"
}
],
"userEligibleSettings": [],
"userMemberSettings": [
{
"ruleIdentifier": "ExpirationRule",
"setting": "{\"permanentAssignment\":false,\"maximumGrantPeriodInMinutes\":480}"
},
{
"ruleIdentifier": "MfaRule",
"setting": "{\"mfaRequired\":false}"
},
{
"ruleIdentifier": "JustificationRule",
"setting": "{\"required\":true}"
},
{
"ruleIdentifier": "ApprovalRule",
"setting": "{\"Enabled\":true,\"Approvers\":[{\"Id\":\"20083cf1-b8d8-43be-9d37-96adfb09e619\",\"Type\":\"User\",\"DisplayName\":\"Alex Wilber\",\"Email\":\"AlexW@contoso.com\"},{\"Id\":\"d158e1b0-5080-4088-a1e7-9ca54f39eb53\",\"Type\":\"User\",\"DisplayName\":\"Alex Wilber\",\"Email\":\"AlexW@contoso.com\"}],\"BusinessFlowId\":\"8df9e93a-6ba9-4453-af43-07cb95435032\"}"
}
]
},
{
"id": "ac642250-9c22-4ec5-a072-02e06c1ef3a0",
"resourceId": "e5e7d29d-5465-45ac-885f-4716a5ee74b5",
"roleDefinitionId": "688de08e-66d4-4efe-b234-1cf476a603b9",
"isDefault": false,
"lastUpdatedDateTime": "2017-12-07T18:12:43.417Z",
"lastUpdatedBy": "Allan Deyoung",
"adminEligibleSettings": [
{
"ruleIdentifier": "ExpirationRule",
"setting": "{\"permanentAssignment\":false,\"maximumGrantPeriodInMinutes\":129600}"
}
],
"adminMemberSettings": [
{
"ruleIdentifier": "ExpirationRule",
"setting": "{\"permanentAssignment\":false,\"maximumGrantPeriodInMinutes\":43200}"
},
{
"ruleIdentifier": "MfaRule",
"setting": "{\"mfaRequired\":false}"
},
{
"ruleIdentifier": "JustificationRule",
"setting": "{\"required\":true}"
}
],
"userEligibleSettings": [],
"userMemberSettings": [
{
"ruleIdentifier": "ExpirationRule",
"setting": "{\"permanentAssignment\":false,\"maximumGrantPeriodInMinutes\":480}"
},
{
"ruleIdentifier": "MfaRule",
"setting": "{\"mfaRequired\":false}"
},
{
"ruleIdentifier": "JustificationRule",
"setting": "{\"required\":true}"
},
{
"ruleIdentifier": "ApprovalRule",
"setting": "{\"Enabled\":true,\"Approvers\":[{\"Id\":\"c178dfee-7236-44b5-a363-e15fc63d91f0\",\"Type\":\"User\",\"DisplayName\":\"Allan Deyoung\",\"Email\":\"AllanD@contoso.com\"}],\"BusinessFlowId\":\"fa7d0b98-ed15-47cd-b3e2-aa6bd3e6533a\"}"
}
]
},
...
]
}