Managing users
The guide in this checklist item will help you add users to your created organization, appoint an administrator, and set user roles.
Add a Yandex user
If your employees have Yandex accounts, e.g., login@yandex.ru
, they can use them to access Yandex Cloud services enabled in your organization.
To add employee accounts to the organization, follow these steps:
-
Log in
as the organization administrator. -
Go to Yandex Cloud Organization
. -
In the panel on the left, select the Users
section. -
In the top-right corner, click Invite users.
-
Enter the email addresses of the users you want to invite to the organization (e.g.,
login@yandex.ru
).You can send invitations to any email address. Invited users will be able to select the appropriate Yandex account once they accept the invitation.
-
Click Send invitation. The users will be added to the organization as soon as they accept the invitation and select a log-in account for the organization.
To access the organization's enabled services, invited users simply need to log in to their Yandex account.
Add federated users
To add federated users, you need to know the user Name IDs returned by the Identity Provider (IdP) server together with the authentication successful response. This is usually the user's primary email address. If you do not know what the server returns as the name ID, contact the administrator who configured authentication for your federation.
To add federation users to an organization:
- Log in
as the organization administrator. - Go to Yandex Cloud Organization
. - In the left-hand panel, select Users
. - In the top-right corner, click
→ Add federated users. - Select the identity federation to add users from.
- List the name IDs of users, separating them with line breaks.
- Click Add. This will give the users access to the organization.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
-
View a description of the add user command:
yc organization-manager federation saml add-user-accounts --help
-
Add users by listing their name IDs separated by a comma:
yc organization-manager federation saml add-user-accounts \ --name <federation_name> \ --name-ids <list_of_user_name_IDs>
Use the addUserAccounts REST API method for the Federation resource or the FederationService/AddUserAccounts gRPC API call and provide the following in the request:
- Federation ID in the
federationId
parameter. - List of user name IDs in the
nameIds
parameter.
Assign roles to the users
- Add the required user if needed.
- In the management console
, on the left, select a cloud. - Go to the Access bindings tab.
- Click Configure access.
- In the window that opens, select User accounts.
- Select a user from the list or search by user.
- Click
Add role and select a role for the cloud. - Click Save.
- Select a role from the Yandex Cloud role reference.
- Get the user ID.
- Assign the role using the command:
yc <SERVICE-NAME> <RESOURCE> add-access-binding <RESOURCE-NAME>|<RESOURCE-ID> \
--role <ROLE-ID> \
--subject userAccount:<USER-ACCOUNT-ID>
where:
<SERVICE-NAME>
: Name of the service for whose resource you are assigning the role, e.g.,resource-manager
.<RESOURCE>
: Resource category, e.g.,cloud
.<RESOURCE-NAME>
: Resource name. You can specify a resource by its name or ID.<RESOURCE-ID>
: Resource ID.<ROLE-ID>
: Role ID, e.g.,resource-manager.clouds.owner
.<USER-ACCOUNT-ID>
: ID of the user account that gets the role.
For example, assign the viewer
role for the my-cloud
cloud.
$ yc resource-manager cloud add-access-binding mycloud \
--role viewer \
--subject userAccount:aje6o61dvog2h6g9a33s
Use the updateAccessBindings
method for the appropriate resource.
- Select a role from the Yandex Cloud role reference.
- Get the user ID.
- Create the request body, e.g., in the
body.json
file. In theaction
property, enterADD
and specify theuserAccount
type and user ID undersubject
.
body.json:
{
"accessBindingDeltas": [{
"action": "ADD",
"accessBinding": {
"roleId": "editor",
"subject": {
"id": "gfei8n54hmfhuk5nogse",
"type": "userAccount"
}
}
}
]
}
-
Assign a role to a service account. For example, for a folder with the
b1gvmob95yys********
ID:export FOLDER_ID=b1gvmob95yys******** export IAM_TOKEN=CggaAT******** curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ${IAM_TOKEN}" \ -d '@body.json' \ "https://resource-manager.api.cloud.yandex.net/resource-manager/v1/folders/${FOLDER_ID}:updateAccessBindings"
Appoint an administrator
To grant organization management access to a user, assign one of the following roles:
-
organization-manager.admin
: Organization administrator role.The role allows you to edit organization settings, create identity federations, add and remove users, create other administrators, and manage the organization's cloud resources.
-
organization-manager.organizations.owner
: Organization owner role.The role allows you to appoint organization owners and use all the administrator privileges.
By default, the user who creates an organization is the organization owner.
-
organization-manager.viewer
: Enables viewing the organization settings without the permission to edit them.