| title | List roles (for a GCP authorization system) |
|---|---|
| description | List all GCP roles in a GCP authorization system. |
| author | mrudulahg01 |
| ms.reviewer | ciem_pm |
| ms.localizationpriority | medium |
| ms.subservice | entra-permissions-management |
| doc_type | apiPageType |
| ms.date | 04/18/2024 |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
[!INCLUDE permissions-management-retirement-note]
List all the gcpRole objects and their properties for a provided GCP authorization system.
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
[!INCLUDE permissions-table]
GET /external/authorizationSystems/{id}/microsoft.graph.gcpAuthorizationSystem/rolesThis method supports the $select, $filter, $count, $top, and $skipToken OData query parameters to help customize the response. For general information, see OData query parameters.
| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Don't supply a request body for this method.
If successful, this method returns a 200 OK response code and a collection of gcpRole objects in the response body.
The following example shows a request.
GET https://graph.microsoft.com/beta/external/authorizationSystems/{id}/microsoft.graph.gcpAuthorizationSystem/roles
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#external/authorizationSystems/{id}/microsoft.graph.gcpAuthorizationSystem/roles",
"value": [
{
"id": "cm9sZXMvYmFja3VwZHIuY29tcHV0ZUVuZ2luZU9wZXJhdG9y",
"externalId": "roles/backupdr.computeEngineOperator",
"displayName": "Backup and DR Compute Engine Operator",
"gcpRoleType": "system",
"scopes": [
{
"service": {
"id": "compute"
},
"resourceType": "instances"
}
]
},
{
"id": "cHJvamVjdHMvaGVsbG8td29ybGQtMjMxMTA3L3JvbGVzL0NLX1JPTEVfYWNjZXNzYXBwcm92YWxfcm9sZQ",
"externalId": "projects/hello-world-231107/roles/CK_ROLE_accessapproval_role",
"displayName": "CK_ROLE_accessapproval_role",
"gcpRoleType": "custom",
"scopes": [
{
"service": {
"id": "compute"
},
"resourceType": "instances"
}
]
}
]
}