zitadel users update
Update a user by id.
Usage
npx @zitadel/cli@latest users update <id> [flags]Arguments
| Argument | Description |
|---|---|
<id> | user id Required. |
Flags
| Flag | Description |
|---|---|
-e, --env <value> | Environment to run against, e.g. production. Defaults to ZITADEL_ENV, then the hosting platform's build (VERCEL_ENV, or Netlify's CONTEXT), then development. |
--env-file <value> | Read ZITADEL_* values from this file ahead of the process environment. A relative path is read from the current directory, not from --cwd. Cannot be combined with --env. |
Optional field flags
| Flag | Description |
|---|---|
--schema <value> | The schema the user follows after this patch. |
--attributes <value> | Repeatable attributes entry: key=value for a string, key:=value for JSON. The changed attributes only. Can be given more than once. |
Raw body flags
| Flag | Description |
|---|---|
--data <value> | Whole body as a JSON object. Field flags and --set apply over it. Not with --file. |
--file <value> | Read the body from a JSON file; - reads stdin. Field flags and --set apply over it. Not with --data. |
--set <value> | Set one field by its dot path: path=value, or path:=json for JSON. Repeatable; applied after the field flags, in order. A key that contains a dot is set through its parent: --set 'parent:={"a.b":"x"}'. Can be given more than once. |
It also takes the global flags.
Examples
npx @zitadel/cli@latest users update <id> --data '{...}' --json
npx @zitadel/cli@latest users update <id> --file ./user.jsonAPI
It calls Update user by ID, PATCH /users/{user_id}, in the Users API.
Was this helpful?