[Yandex Cloud documentation](../../../index.md) > [Yandex Identity Hub](../../index.md) > [Step-by-step guides](../index.md) > Managing domains > Getting a list of domains

# Getting a list of domains


## Getting a list of domains in a user pool {#userpool}

{% list tabs group=instructions %}

- Cloud Center UI {#cloud-center}

  1. Log in to [Yandex Identity Hub](https://center.yandex.cloud/organization) using an administrator or organization owner account.
  1. In the left-hand panel, click ![userpool](../../../_assets/organization/userpool.svg) **User pools**.
  1. Select the pool from the [user pool](../../concepts/user-pools.md) list.
  1. Under **Domains**, you will see a list of all available domains.

- CLI {#cli}

  If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../../cli/quickstart.md#install).

  The folder used by default is the one specified when [creating](../../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

  1. See the description of the CLI command for getting a list of [domains](../../concepts/domains.md) in a [user pool](../../concepts/user-pools.md):

     ```bash
     yc organization-manager idp userpool domain list --help
     ```

  1. Run this command:

      ```bash
      yc organization-manager idp userpool domain list <pool_ID>
      ```

- API {#api}

  Use the [Userpool.ListDomains](../../idp/api-ref/Userpool/listDomains.md) REST API method for the [Userpool](../../idp/api-ref/Userpool/index.md) resource or the [UserpoolService/ListDomains](../../idp/api-ref/grpc/Userpool/listDomains.md) gRPC API call.

{% endlist %}

## Getting a list of domains in a federation {#federation}

{% list tabs group=instructions %}

- CLI {#cli}

  If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../../cli/quickstart.md#install).

  The folder used by default is the one specified when [creating](../../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

  1. See the description of the CLI command for getting a list of [domains](../../concepts/domains.md) in a [federation](../../concepts/add-federation.md):

     ```bash
     yc organization-manager federation saml list-domains --help
     ```

  1. Run this command:

      ```bash
      yc organization-manager federation saml list-domains <federation_name_or_ID>
      ```
      
- API {#api}

  Use the [Federation.ListDomains](../../saml/api-ref/Federation/listDomains.md) REST API method for the [Federation](../../saml/api-ref/Federation/index.md) resource or the [FederationService/ListDomains](../../saml/api-ref/grpc/Federation/listDomains.md) gRPC API call.

{% endlist %}