List governanceResources
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 governanceResource that the requestor has access to.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
Azure resources
Permission type | Permissions |
---|---|
Delegated (work or school account) | PrivilegedAccess.ReadWrite.AzureResources |
Delegated (personal Microsoft account) | Not supported. |
Application | PrivilegedAccess.Read.AzureResources |
Azure AD
Permission type | Permissions |
---|---|
Delegated (work or school account) | PrivilegedAccess.ReadWrite.AzureAD |
Delegated (personal Microsoft account) | Not supported. |
Application | PrivilegedAccess.Read.AzureAD |
Groups
Permission type | Permissions |
---|---|
Delegated (work or school account) | PrivilegedAccess.ReadWrite.AzureADGroup |
Delegated (personal Microsoft account) | Not supported. |
Application | PrivilegedAccess.Read.AzureADGroup |
HTTP request
GET /privilegedAccess/azureResources/resources
Optional query parameters
This method supports the OData query parameters to help customize the response.
Request headers
Name | Description |
---|---|
Authorization | Bearer {code} |
Request body
Do not supply a request body for this method.
Response
If successful, this method returns a 200 OK
response code and collection of governanceResource objects in the response body.
Examples
This example lists all resources I can currently access.
Request
GET https://graph.microsoft.com/beta/privilegedAccess/azureResources/resources
Response
Here is an example of the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-type: application/json
Content-Length: 1289
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#governanceResources",
"value":[
{
"id": "fb016e3a-c3ed-4d9d-96b6-a54cd4f0b735",
"externalId": "/subscriptions/38ab2ccc-3747-4567-b36b-9478f5602f0d/resourceGroups/AnujRG/providers/Microsoft.Storage/storageAccounts/anujstoragefimdev",
"type": "Microsoft.Storage/storageAccounts",
"displayName": "anujstoragefimdev",
"status": "Active",
"registeredDateTime": "2018-04-05T22:30:37.13Z",
"registeredRoot": "/subscriptions/38ab2ccc-3747-4567-b36b-9478f5602f0d",
},
{
"id": "0e0e4461-0c46-4d13-bf69-7cacbec75471",
"externalId": "/subscriptions/38ab2ccc-3747-4567-b36b-9478f5602f0d/resourceGroups/ARPJ-TESTRG-01/providers/Microsoft.Compute/virtualMachines/APRJ-VM-01-T",
"type": "Microsoft.Compute/virtualMachines",
"displayName": "APRJ-VM-01-T",
"status": "Active",
"registeredDateTime": "2018-04-05T22:30:37.13Z",
"registeredRoot": "/subscriptions/38ab2ccc-3747-4567-b36b-9478f5602f0d",
},
{
"id": "c072eb85-e47b-4627-81cb-5af82a8fc9fb",
"externalId": "/subscriptions/38ab2ccc-3747-4567-b36b-9478f5602f0d/resourceGroups/ARPJ-TESTRG-01/providers/Microsoft.Compute/virtualMachines/APRJ-VM-01-T/extensions/IaaSAntimalware",
"type": "Microsoft.Compute/virtualMachines/extensions",
"displayName": "APRJ-VM-01-T/IaaSAntimalware",
"status": "Active",
"registeredDateTime": "2018-04-05T22:30:37.13Z",
"registeredRoot": "/subscriptions/38ab2ccc-3747-4567-b36b-9478f5602f0d",
}
]
}
Feedback
Submit and view feedback for