Deleting members
-
Log in to Yandex Identity Hub
using an administrator or organization owner account. -
In the left-hand panel, select
Groups and click the line with the group name you need. -
Navigate to the Members tab.
-
Locate the group member. Use search, if required.
-
In the line with the group member you want to delete, click
and select Remove from group. -
In the window that opens, confirm the exclusion of the member from the group.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder used by default is the one specified when creating 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.
-
See the description of the command for deleting members from a Yandex Identity Hub user group:
yc organization-manager group remove-members --help -
To delete a member from a user group, run the following command:
yc organization-manager group remove-members \ --name <group_name> \ --organization-id <organization_ID> \ --subject-id <member_ID>Where:
--name: User group name. This is a required setting.--organization-id: Organization ID.--subject-id: ID of the member you are deleting from the group.
With Terraform
Terraform is distributed under the Business Source License
For more information about the provider resources, see the relevant documentation on the Terraform
If you do not have Terraform yet, install it and configure the Yandex Cloud provider.
-
In the configuration file, describe the group members that are to remain in the group:
resource "yandex_organizationmanager_group_membership" "group-members" { group_id = "<group_ID>" members = [ "<member_1_ID>", "<member_2_ID>" ] }Where:
group_id: ID of the group to delete a member from.members: IDs of the members that are to remain in the group.
-
Create the resources:
-
In the terminal, navigate to the configuration file directory.
-
Make sure the configuration is correct using this command:
terraform validateIf the configuration is valid, you will get this message:
Success! The configuration is valid. -
Run this command:
terraform planYou will see a list of resources and their properties. No changes will be made at this step. Terraform will show any errors in the configuration.
-
Apply the configuration changes:
terraform apply -
Type
yesand press Enter to confirm the changes.
Terraform will create all the required resources. You can check the new resources and their settings in the Cloud Center UI
or using this CLI command:yc organization-manager group list-members \ --name <group_name> \ --organization-id <organization_ID> -
Use the Group.updateMembers REST API method for the Group resource or the GroupService/UpdateMembers gRPC API call.