# Method: orgUnits.memberships.list

List `https://docs.cloud.google.com/identity/docs/reference/rest/v1beta1/orgUnits.memberships#OrgMembership` resources in an OrgUnit treated as 'parent'.

Parent format: orgUnits/{$orgUnitId}

where `$orgUnitId` is the `orgUnitId` from the [Admin SDK `OrgUnit` resource](https://developers.google.com/admin-sdk/directory/reference/rest/v1/orgunits)

### HTTP request

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

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. Immutable. OrgUnit which is queried for a list of memberships. Format: orgUnits/{$orgUnitId} where `$orgUnitId` is the `orgUnitId` from the [Admin SDK `OrgUnit` resource](https://developers.google.com/admin-sdk/directory/reference/rest/v1/orgunits). |

### Query parameters

| Parameters ||
|---|---|
| `customer` | `string` Required. Immutable. Customer that this `https://docs.cloud.google.com/identity/docs/reference/rest/v1beta1/orgUnits.memberships#OrgMembership` belongs to. All authorization will happen on the role assignments of this customer. Format: customers/{$customerId} where `$customerId` is the `id` from the [Admin SDK `Customer` resource](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers). You may also use `customers/my_customer` to specify your own organization. |
| `filter` | `string` The search query. Must be specified in [Common Expression Language](https://opensource.google/projects/cel). May only contain equality operators on the `type` (e.g., `type == 'shared_drive'`). |
| `pageSize` | `integer` The maximum number of results to return. The service may return fewer than this value. If omitted (or defaulted to zero) the server will default to 50. The maximum allowed value is 100, though requests with pageSize greater than that will be silently interpreted as 100. |
| `pageToken` | `string` A page token, received from a previous `OrgMembershipsService.ListOrgMemberships` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListOrgMembershipsRequest` must match the call that provided the page token. |

### Request body

The request body must be empty.

### Response body

The response message for `https://docs.cloud.google.com/identity/docs/reference/rest/v1beta1/orgUnits.memberships/list#google.apps.cloudidentity.orgunits.v1beta1.OrgMembershipsService.ListOrgMemberships`.

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

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

| Fields ||
|---|---|
| `orgMemberships[]` | ``object (`https://docs.cloud.google.com/identity/docs/reference/rest/v1beta1/orgUnits.memberships#OrgMembership`)`` The non-vacuous membership in an orgUnit. |
| `nextPageToken` | `string` A token, which can be sent as `pageToken` to retrieve the next page. If this field is empty, there are no subsequent pages. |

### Authorization scopes

Requires one of the following OAuth scopes:

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

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