# Method: groups.memberships.searchTransitiveMemberships

Search transitive memberships of a group.

**Note:** This feature is only available to Google Workspace Enterprise Standard, Enterprise Plus, and Enterprise for Education; and Cloud Identity Premium accounts.

A transitive membership is any direct or indirect membership of a group. Actor must have view permissions to all transitive memberships.

### HTTP request

`GET https://cloudidentity.googleapis.com/v1beta1/{parent=groups/*}/memberships:searchTransitiveMemberships`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` [Resource name](https://cloud.google.com/apis/design/resource_names) of the group to search transitive memberships in. Format: `groups/{group_id}`, where `group_id` is the unique ID assigned to the Group. |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` The default page size is 200 (max 1000). |
| `pageToken` | `string` The next_page_token value returned from a previous list request, if any. |

### Request body

The request body must be empty.

### Response body

The response message for `https://docs.cloud.google.com/identity/docs/reference/rest/v1beta1/groups.memberships/searchTransitiveMemberships#google.apps.cloudidentity.groups.v1beta1.MembershipsService.SearchTransitiveMemberships`.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "memberships": [ { object (`https://docs.cloud.google.com/identity/docs/reference/rest/v1beta1/groups.memberships/searchTransitiveMemberships#MemberRelation`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `memberships[]` | ``object (`https://docs.cloud.google.com/identity/docs/reference/rest/v1beta1/groups.memberships/searchTransitiveMemberships#MemberRelation`)`` List of transitive memberships satisfying the query. |
| `nextPageToken` | `string` Token to retrieve the next page of results, or empty if there are no more results. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-identity.groups.readonly`
- `https://www.googleapis.com/auth/cloud-identity.groups`
- `https://www.googleapis.com/auth/cloud-identity`
- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authorization guide](https://developers.google.com/workspace/guides/configure-oauth-consent).

## MemberRelation

Message representing a transitive membership of a group.

| JSON representation |
|---|
| ``` { "preferredMemberKey": [ { object (`https://docs.cloud.google.com/identity/docs/reference/rest/v1beta1/EntityKey`) } ], "member": string, "roles": [ { object (`https://docs.cloud.google.com/identity/docs/reference/rest/v1beta1/TransitiveMembershipRole`) } ], "relationType": enum (`https://docs.cloud.google.com/identity/docs/reference/rest/v1beta1/RelationType`) } ``` |

| Fields ||
|---|---|
| `preferredMemberKey[]` | ``object (`https://docs.cloud.google.com/identity/docs/reference/rest/v1beta1/EntityKey`)`` Entity key has an id and a namespace. In case of discussion forums, the id will be an email address without a namespace. |
| `member` | `string` Resource name for this member. |
| `roles[]` | ``object (`https://docs.cloud.google.com/identity/docs/reference/rest/v1beta1/TransitiveMembershipRole`)`` The membership role details (i.e name of role and expiry time). |
| `relationType` | ``enum (`https://docs.cloud.google.com/identity/docs/reference/rest/v1beta1/RelationType`)`` The relation between the group and the transitive membership. |