Adding a user to an organization
Add a user to your organization to grant him or her access to Yandex Cloud resources.
You can add users with a Yandexaccount as well as federated users. To do this, you need to be the organization administrator (the organization-manager.admin
role) or owner (the organization-manager.organizations.owner
role).
The user will become an organization member, and you will be able to grant them access to your cloud resources by assigning them a role. A new organization member will not have access to cloud resources until you assign them a role.
Add a user to your organization and grant them the role needed to access Yandex Cloud resources. For example, enable the user to create managed DB clusters or track the status of VMs in use.
You can add users with a Yandex account as well as federated users. To do this, you need to be the organization administrator (organization-manager.admin
role) or owner (organization-manager.organizations.owner
role). To learn how to grant a role to a user, see Assigning roles.
Note
To enable a user to access the management consoleresource-manager.clouds.member
. However, you may also assign other roles if you know which permissions you want to grant to the invited users.
To grant these permissions to all the organization users at once, assign the role to the All users in organization X
system group. When using the CLI or API, no additional roles are required.
Yandex account users
If your employees have Yandex accounts, e.g., login@yandex.ru
, they can use them to access Yandex Cloud services enabled in your organization.
You can invite a user to an organization via the management console or the Cloud Center interface. An invitation to join your organization will be sent to the user's email address.
Send an invitation
-
Go to Yandex Cloud Organization
. -
In the left-hand panel, select
Users. -
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.
-
Log in to the management console
with the cloud administrator account. -
Select the appropriate cloud from the list on the left. Example:
-
In the top-right corner, click
and select 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 user will be able to log in to the organization upon accepting the invitation via the emailed link and selecting an account for log-in. To access the services enabled for the organization, the users you invited simply need to log in to their Yandex account.
You can delete or resend your invitation only via Cloud Organization.
Delete the invitation
-
Go to Yandex Cloud Organization
. -
In the left-hand panel, select
Users. -
Select the Invitations tab in the center of the screen.
-
In the row with the invitation, click
and select Delete invitation. -
In the window that opens, confirm the deletion.
Resend your invitation
-
Go to Yandex Cloud Organization
. -
In the left-hand panel, select
Users. -
Select the Invitations tab in the center of the screen.
-
In the row with the invitation, click
and select Resend. -
In the window that opens, confirm resending the invitation.
Note
To better safeguard your resources from unauthorized access, enable Yandex ID two-factor authentication
Federated users
If you did not enable the Automatically create users option when setting up a federation, you will have to add federated users to your organization manually.
To do this, you need to know the user name IDs returned by the Identity Provider (IdP) server together with the successful authentication response. This will usually be the user's email address. To find out what the server returns as the name ID, contact the administrator who configured authentication for your federation.
If the Automatically create users option is enabled, a federation will only add users logging in to a cloud for the first time. If a federated user has been removed, they can only be added again manually.
You do not need to invite federated users to the organization; they are added automatically after logging in.
Add federated users
-
Go to Yandex Cloud Organization
. -
In the left-hand panel, select
Users. -
In the top-right corner, click More
and select Add federated users. -
Select the identity federation to add users from.
-
List the name IDs of users, separating them with spaces or 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>
With Terraform
Terraform is distributed under the Business Source License
For more information about the provider resources, see the documentation on the Terraform
If you don't have Terraform, install it and configure the Yandex Cloud provider.
-
In the configuration file, describe the parameters of the resources you want to create:
resource "yandex_organizationmanager_saml_federation_user_account" "some_account" { federation_id = "<federation_ID>" name_id = "<User_name_ID>" }
Where:
federation_id
: ID of the federation to add the user to.name_id
: Name ID of the user.
For more information about the
yandex_organizationmanager_saml_federation_user_account
resource parameters, see the provider documentation . -
Create resources:
-
In the terminal, change to the folder where you edited the configuration file.
-
Make sure the configuration file is correct using the command:
terraform validate
If the configuration is correct, the following message is returned:
Success! The configuration is valid.
-
Run the command:
terraform plan
The terminal will display a list of resources with parameters. No changes are made at this step. If the configuration contains errors, Terraform will point them out.
-
Apply the configuration changes:
terraform apply
-
Confirm the changes: type
yes
in the terminal and press Enter.
Terraform will create all the required resources. You can check the new resources using the management console
or this CLI command:yc organization-manager federations saml \ --organization-id <organization_ID> list-user-accounts \ --id <federation_ID>
-
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.