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

# Viewing roles assigned for a workflow

{% note info %}

Workflows automatically [inherit](../../../../iam/concepts/access-control/index.md#inheritance) roles assigned for the relevant 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 a [workflow](../../../concepts/workflows/workflow.md), run this command:

  ```bash
  yc serverless workflow list-access-bindings <workflow_name_or_ID>
  ```

  Result:

  ```text
  +---------------------------------+----------------+----------------------+
  |             ROLE ID             |  SUBJECT TYPE  |      SUBJECT ID      |
  +---------------------------------+----------------+----------------------+
  | serverless.workflows.admin      | serviceAccount | ajef2lm8ahpc******** |
  | serverless.workflows.viewer     | serviceAccount | rrbilgiqaptv******** |
  | serverless.workflows.executor   | userAccount    | aje9o8d241nl******** |
  +---------------------------------+----------------+----------------------+
  ```

- API {#api}

  Use the [listAccessBindings](../../../workflows/api-ref/Workflow/listAccessBindings.md) REST API method for the [Workflow](../../../workflows/api-ref/Workflow/index.md) resource or the [WorkflowService/ListAccessBindings](../../../workflows/api-ref/grpc/Workflow/listAccessBindings.md) gRPC API call.

{% endlist %}