Skip to content

Latest commit

 

History

History
124 lines (102 loc) · 3.94 KB

File metadata and controls

124 lines (102 loc) · 3.94 KB
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

List roles (for a GCP authorization system)

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.

Permissions

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]

HTTP request

GET /external/authorizationSystems/{id}/microsoft.graph.gcpAuthorizationSystem/roles

Optional query parameters

This method supports the $select, $filter, $count, $top, and $skipToken OData query parameters to help customize the response. For general information, see OData query parameters.

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 a collection of gcpRole objects in the response body.

Examples

Request

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]


Response

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"
        }
      ]
    }
  ]
}