Viewing roles assigned in an organization
You can view all roles assigned to subjects in an organization:
-
Log in to Yandex Identity Hub
using an administrator or organization owner account. -
In the left-hand panel, select
Access bindings. -
The Access bindings page will display information about users and roles assigned to them.
If you have more than one organization, you can switch to the one you need. To do this, click
next to the name of the current organization in the top-left corner of the screen and select another one.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID>
command. You can also set a different folder for any specific command using the --folder-name
or --folder-id
parameter.
-
To view a list of organizations available to you, run this command:
yc organization-manager organization list
Result:
+----------------------+-----------------------------+-------------------------+--------+ | ID | NAME | TITLE | LABELS | +----------------------+-----------------------------+-------------------------+--------+ | bpf1smsil5q0******** | org1-technical-name | Organization One | | | bpf2c65rqcl8******** | org2-technical-name | Organization Two | | | bpfaidqca8vd******** | org3-technical-name | Organization Three | | +----------------------+-----------------------------+-------------------------+--------+
Copy the ID of the organization you need from the
ID
column. -
See the description of the CLI command to get a list of roles assigned in an organization:
yc organization-manager organization list-access-bindings --help
-
Get a list of roles assigned in an organization by specifying its name or ID:
yc organization-manager organization list-access-bindings <organization_ID>
Result:
+------------------------------------------+----------------+----------------------+ | ROLE ID | SUBJECT TYPE | SUBJECT ID | +------------------------------------------+----------------+----------------------+ | auditor | serviceAccount | ajefbjkmgjt1******** | | admin | userAccount | asefbskmgjt1******** | | organization-manager.organizations.owner | userAccount | ajcfabjkmgjt******** | +------------------------------------------+----------------+----------------------+
Use the ListAccessBindings REST API method for the Organization resource or the OrganizationService/ListAccessBindings gRPC API call.