[Yandex Cloud documentation](../../../../index.md) > [Yandex Serverless Integrations](../../../index.md) > [Step-by-step guides](../../index.md) > EventRouter > Managing resource access permissions > Viewing roles assigned for a resource

# Viewing roles assigned for an EventRouter resource

{% note info %}

An EventRouter resource automatically [inherits](../../../../iam/concepts/access-control/index.md#inheritance) roles assigned for a folder, cloud, or organization. However, they are not displayed in the list of assigned roles. You can learn more about viewing roles [here](../../../../iam/operations/roles/get-assigned-roles.md).

{% endnote %}

{% 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.

  To view roles assigned for an EventRouter resource, run this command:

  ```bash
  yc serverless <resource_type> list-access-bindings <resource_name_or_ID>
  ```

  **Example**

  Viewing roles assigned for a [bus](../../../concepts/eventrouter/bus.md):

  ```bash
  yc serverless eventrouter bus list-access-bindings epdplu8jn7sr********
  ```

  Result:

  ```text
  +---------------------------------+----------------+----------------------+
  |             ROLE ID             |  SUBJECT TYPE  |      SUBJECT ID      |
  +---------------------------------+----------------+----------------------+
  | serverless.eventrouter.admin    | serviceAccount | ajef2lm8ahpc******** |
  | serverless.eventrouter.auditor  | serviceAccount | rrbilgiqaptv******** |
  +---------------------------------+----------------+----------------------+
  ```

- API {#api}

  Use the `listAccessBindings` REST API method for the relevant resource or the `<service>/ListAccessBindings` gRPC API call.

  For example, for a bus, use the [listAccessBindings](../../../eventrouter/api-ref/Bus/listAccessBindings.md) REST API method for the [Bus](../../../eventrouter/api-ref/Bus/index.md) resource or the [BusService/ListAccessBindings](../../../eventrouter/api-ref/grpc/Bus/listAccessBindings.md) gRPC API call.

{% endlist %}