Assigning a user as an organization administrator
- 
Log in to Yandex Identity Hub - 
In the left-hand panel, select - 
At the top right, click Assign bindings. 
- 
Select the user you want to assign as an administrator. If required, use the search bar. 
- 
Click organization-manager.admin.
- 
Click Save. 
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
- 
Assign the role using this command: yc organization-manager organization add-access-binding <organization_name_or_ID> \ --role <role_ID> \ --subject userAccount:<user_ID>Where: - --role: Role ID. Specify the- organization-manager.adminrole.
- --subject: User ID.
 For example, this command assigns the administrator role for the organization with the bpf3crucp1v2********ID:yc organization-manager organization add-access-binding bpf3crucp1v2******** \ --role organization-manager.admin \ --subject userAccount:aje6o61dvog2********
If you do not have Terraform yet, install it and configure the Yandex Cloud provider.
- 
Describe the parameters of the roles you assign in the configuration file: resource "yandex_organizationmanager_organization_iam_binding" "org_admin_role" { organization_id = "<organization_ID>" role = "<role_ID>" members = [ "userAccount:<user_ID>", ] }Where: - organization_id: Organization ID.
- role: Specify the- organization-manager.adminrole. For each role, you can only use one- yandex_organization manager_organization_iam_bindingresource.
- userAccount:<user_ID>: ID of the user Yandex account.
 For more information about resources you can create with Terraform, see the provider documentation. 
- 
Create the resources: - 
In the terminal, go to the directory where you edited the configuration file. 
- 
Make sure the configuration file is correct using this command: terraform validateIf the configuration is correct, you will get this message: Success! The configuration is valid.
- 
Run this command: terraform planYou will see a detailed list of resources. No changes will be made at this step. If the configuration contains any errors, Terraform will show them. 
- 
Apply the changes: terraform apply
- 
Type yesand press Enter to confirm the changes.
 
- 
The user will thus be assigned the organization administrator role. You can check the new role in the management console
Use the REST API method updateAccessBindings for the Organization resource or the gRPC API call OrganizationService/UpdateAccessBindings and provide the following in the request:
- The organization-manager.adminrole ID in theroleIdparameter for REST API orrole_idfor gRPC API.
- User ID and type in the subjectsection.