# List the principal's parent groups

Launch stage: Beta

`GET /api/2.0/identity/{parent=accounts/*/me}/transitive-parent-groups`

`GET /api/2.0/identity/{parent=me}/transitive-parent-groups`

Lists direct and inherited parent groups for the principal.

API scopes: identity

## Path parameters

- `parent` (string, required)
  The parent Me view. Use accounts/{account_id}/me on an account host or
   me on a workspace host.

## Query parameters

- `page_size` (int32, optional)
  Omitted or zero defaults to 1,000. Values above 1,000 are clamped to 1,000.
   Negative values return an INVALID_PARAMETER_VALUE error.
- `page_token` (string, optional)
  Cursor from a prior page. Use it with the same parent and request context
   to continue the listing; the page size may change between requests.

## Returns

- `me_transitive_parent_groups` (array of object, optional)
  The direct and inherited parent groups visible in the current request context.
  - `name` (string, optional, ID, Immutable)
    The parent group resource name, in the format
     accounts/{account_id}/me/transitive-parent-groups/{group_id} on an account host or
     me/transitive-parent-groups/{group_id} on a workspace host.
  - `account_id` (string, optional, Output only)
    The account ID of the parent group.
  - `group_id` (string, optional, Output only)
    The internal ID of the parent group.
  - `external_id` (string, optional, Output only)
    The external ID of the parent group in the customer's identity provider, if present.
  - `group_name` (string, optional, Output only)
    The name of the parent group.
- `next_page_token` (string, optional)
  A token for the next page. Omitted when there are no more groups.

## Response

```json
{
  "me_transitive_parent_groups": [
    {
      "name": "string",
      "account_id": "string",
      "group_id": "string",
      "external_id": "string",
      "group_name": "string"
    }
  ],
  "next_page_token": "string"
}
```

