tg-disable-user
Disable a user and revoke their API keys.
Synopsis
tg-disable-user --user-id ID [options]
Description
Disables a user by setting their enabled flag to false and revoking all of their API keys. This is a soft-delete operation – the user record is retained but the user can no longer authenticate. To fully remove the user, use tg-delete-user instead.
Options
Required Arguments
| Option | Description |
|---|---|
--user-id ID | ID of the user to disable |
Optional Arguments
| Option | Default | Description |
|---|---|---|
-u, --api-url URL | $TRUSTGRAPH_URL or http://localhost:8088/ | TrustGraph API URL |
-t, --token TOKEN | $TRUSTGRAPH_TOKEN | Authentication token |
-w, --workspace WORKSPACE | Caller’s workspace | Target workspace |
Examples
# Disable a user
tg-disable-user --user-id abc123
# Disable a user in a specific workspace
tg-disable-user --user-id abc123 -w research-team
Environment Variables
TRUSTGRAPH_URL: Default API URLTRUSTGRAPH_TOKEN: Authentication token
Related Commands
tg-enable-user- Re-enable a disabled usertg-delete-user- Delete a user permanentlytg-update-user- Update user profile fieldstg-list-users- List users in the workspacetg-revoke-api-key- Revoke an individual API key