# Method: projects.relatedaccountgroupmemberships.search

- [HTTP request](https://docs.cloud.google.com/recaptcha/docs/reference/rest/v1/projects.relatedaccountgroupmemberships/search#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/recaptcha/docs/reference/rest/v1/projects.relatedaccountgroupmemberships/search#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/recaptcha/docs/reference/rest/v1/projects.relatedaccountgroupmemberships/search#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/recaptcha/docs/reference/rest/v1/projects.relatedaccountgroupmemberships/search#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/recaptcha/docs/reference/rest/v1/projects.relatedaccountgroupmemberships/search#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/recaptcha/docs/reference/rest/v1/projects.relatedaccountgroupmemberships/search#body.SearchRelatedAccountGroupMembershipsResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/recaptcha/docs/reference/rest/v1/projects.relatedaccountgroupmemberships/search#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/recaptcha/docs/reference/rest/v1/projects.relatedaccountgroupmemberships/search#body.aspect_1)

Search group memberships related to a given account.

### HTTP request

`POST https://recaptchaenterprise.googleapis.com/v1/{project=projects/*}/relatedaccountgroupmemberships:search`

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

### Path parameters

| Parameters ||
|---|---|
| `project` | `string` Required. The name of the project to search related account group memberships from. Specify the project name in the following format: `projects/{project}`. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "accountId": string, "hashedAccountId": string, "pageSize": integer, "pageToken": string } ``` |

| Fields ||
|---|---|
| `accountId` | `string` Optional. The unique stable account identifier used to search connections. The identifier should correspond to an `accountId` provided in a previous `CreateAssessment` or `AnnotateAssessment` call. Either hashedAccountId or accountId must be set, but not both. |
| `hashedAccountId (deprecated)` | `string (https://developers.google.com/discovery/v1/type-format format)` Optional. Deprecated: use `accountId` instead. The unique stable hashed account identifier used to search connections. The identifier should correspond to a `hashedAccountId` provided in a previous `CreateAssessment` or `AnnotateAssessment` call. Either hashedAccountId or accountId must be set, but not both. A base64-encoded string. |
| `pageSize` | `integer` Optional. The maximum number of groups to return. The service might return fewer than this value. If unspecified, at most 50 groups are returned. The maximum value is 1000; values above 1000 are coerced to 1000. |
| `pageToken` | `string` Optional. A page token, received from a previous `relatedaccountgroupmemberships.search` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `relatedaccountgroupmemberships.search` must match the call that provided the page token. |

### Response body

The response to a `relatedaccountgroupmemberships.search` call.

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

| JSON representation |
|---|
| ``` { "relatedAccountGroupMemberships": [ { object (`https://docs.cloud.google.com/recaptcha/docs/reference/rest/v1/RelatedAccountGroupMembership`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `relatedAccountGroupMemberships[]` | ``object (`https://docs.cloud.google.com/recaptcha/docs/reference/rest/v1/RelatedAccountGroupMembership`)`` The queried memberships. |
| `nextPageToken` | `string` A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. |

### Authorization scopes

Requires the following OAuth scope:

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

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `project` resource:

- `recaptchaenterprise.relatedaccountgroupmemberships.list`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).