[Yandex Cloud documentation](../../../../index.md) > [Yandex Identity Hub](../../../index.md) > API reference > [gRPC](../index.md) > [Group](index.md) > List

# Identity Hub API, gRPC: GroupService.List

Retrieves the list of group resources.

## gRPC request

**rpc List ([ListGroupsRequest](#yandex.cloud.organizationmanager.v1.ListGroupsRequest)) returns ([ListGroupsResponse](#yandex.cloud.organizationmanager.v1.ListGroupsResponse))**

## ListGroupsRequest {#yandex.cloud.organizationmanager.v1.ListGroupsRequest}

```json
{
  "organization_id": "string",
  "page_size": "int64",
  "page_token": "string",
  "filter": "string"
}
```

#|
||Field | Description ||
|| organization_id | **string**

Required field. ID of the organization to list groups in.
To get the organization ID, use a [yandex.cloud.organizationmanager.v1.OrganizationService.List](../Organization/list.md#List) request.

The maximum string length in characters is 50. ||
|| page_size | **int64**

The maximum number of results per page to return. If the number of available
results is larger than `page_size`,
the service returns a [ListGroupsResponse.next_page_token](#yandex.cloud.organizationmanager.v1.ListGroupsResponse)
that can be used to get the next page of results in subsequent list requests.
Default value: 100.

Acceptable values are 0 to 1000, inclusive. ||
|| page_token | **string**

Page token. Set `page_token`
to the [ListGroupsResponse.next_page_token](#yandex.cloud.organizationmanager.v1.ListGroupsResponse)
returned by a previous list request to get the next page of results.

The maximum string length in characters is 2000. ||
|| filter | **string**

A filter expression that filters resources listed in the response.
The expression must specify:
1. The field name. Currently you can use filtering only on the [Group.name](#yandex.cloud.organizationmanager.v1.Group) field.
2. An `=` operator.
3. The value in double quotes (`"`). Must be 3-63 characters long and match the regular expression `[a-z][-a-z0-9]{1,61}[a-z0-9]`.

The maximum string length in characters is 1000. ||
|#

## ListGroupsResponse {#yandex.cloud.organizationmanager.v1.ListGroupsResponse}

```json
{
  "groups": [
    {
      "id": "string",
      "organization_id": "string",
      "created_at": "google.protobuf.Timestamp",
      "name": "string",
      "description": "string",
      "subject_container_id": "string",
      "external_id": "string",
      "labels": "map<string, string>"
    }
  ],
  "next_page_token": "string"
}
```

#|
||Field | Description ||
|| groups[] | **[Group](#yandex.cloud.organizationmanager.v1.Group)**

List of Group resources. ||
|| next_page_token | **string**

This token allows you to get the next page of results for list requests. If the number of results
is larger than [ListGroupsRequest.page_size](#yandex.cloud.organizationmanager.v1.ListGroupsRequest), use
the `next_page_token` as the value
for the [ListGroupsRequest.page_token](#yandex.cloud.organizationmanager.v1.ListGroupsRequest) query parameter
in the next list request. Each subsequent list request will have its own
`next_page_token` to continue paging through the results. ||
|#

## Group {#yandex.cloud.organizationmanager.v1.Group}

A Group resource.
For more information, see [Groups](../../../operations/manage-groups.md).

#|
||Field | Description ||
|| id | **string**

ID of the group. ||
|| organization_id | **string**

ID of the organization that the group belongs to. ||
|| created_at | **[google.protobuf.Timestamp](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#timestamp)**

Creation timestamp. ||
|| name | **string**

Name of the group. ||
|| description | **string**

Description of the group. ||
|| subject_container_id | **string**

Id of the subject container that external group belongs to. It is set if group is external. ||
|| external_id | **string**

Id of the group from external system. It is set if group is external. ||
|| labels | **object** (map<**string**, **string**>)

Resource labels as `key:value` pairs. ||
|#