Skip to main content
Manage department hierarchies and user membership in an existing user pool
Create the user pool first and sign in with permission to manage it. Every operation requires --user-pool-id. Use global --provider to select Volcengine or BytePlus and the matching account and region

Commands

department create

Create a department in a user pool

department update

Update a department’s fields in a user pool

department list

List child departments in a user pool
Pass the returned nextToken to --next-token to read subsequent pages; the CLI does not fetch every page automatically

department add-users

Add users to a department

department remove-users

Remove users from a department

department change-users

Move users from one department to another

department delete

Delete a department from a user pool
Deletion is irreversible. Check the user pool and resource IDs. Interactive terminals prompt for confirmation; scripts must pass --yes
Membership changes return a result for each user. Partial failures produce a nonzero exit status; successful changes are not rolled back

Verify hierarchy and membership changes

Save the department ID returned by creation, then query the parent’s immediate children to confirm the hierarchy:
This query does not recursively return the full organization tree or list department members. Membership commands need existing user IDs in the same pool. Check per-user results and retry only failures. remove-users removes department membership without deleting user accounts
Last modified on September 19, 2026