Manage Users & Groups
This guide covers user provisioning and group management via CLI.
Users
List Users
lhc users list
lhc users list --limit 100
Get a User
lhc users get <user-id>
Invite a User
Inviting a user sends them an email with a registration link:
lhc users create --email jane@example.com --role user
Valid roles: user, builder, admin.
Update a User
Change name or role independently:
# Update display name
lhc users update <user-id> --name "Jane Smith"
# Change role
lhc users update <user-id> --role builder
# Update both
lhc users update <user-id> --name "Jane Smith" --role builder
Delete a User
lhc users delete <user-id>
Search Users
lhc users search "jane"
Count Users
lhc users count
Groups
Groups control access to shared content such as dashboards and charts.
List Groups
lhc groups list
Get a Group
lhc groups get <group-id>
Create a Group
lhc groups create --name "Data Analysts" --description "Access to analytics dashboards"
Update a Group
lhc groups update <group-id> --name "Analytics Team"
Delete a Group
lhc groups delete <group-id>
List Group Members
lhc groups members <group-id>
Add a User to a Group
lhc groups add-user <group-id> <user-id>
Remove a User from a Group
lhc groups remove-user <group-id> <user-id>
Search Groups
lhc groups search "analyst"
Provisioning Example
Invite a new user, create a group, and add the user to it:
# Invite user and capture ID
USER_ID=$(lhc users create --email bob@example.com --role builder --output json \
| python3 -c "import json,sys; print(json.load(sys.stdin)['id'])")
# Create a group
GROUP_ID=$(lhc groups create --name "Builders" --output json \
| python3 -c "import json,sys; print(json.load(sys.stdin)['id'])")
# Add user to group
lhc groups add-user "$GROUP_ID" "$USER_ID"