CreateUser
Create a new user account
Examples
With a password piped in on standard input (e.g. from a secret store):
octo-cli -c CreateUser `
-un "john.doe" `
-e "john.doe@example.com" `
-ps
Options
| Short | Long | Required | Description |
|---|---|---|---|
-e | --eMail | yes | E-Mail of user |
-un | --userName | yes | User name |
-p | --password | no | Deprecated: password of the user. A value on the command line ends up in the shell history and the process list. Use --password-stdin or the environment variable OCTO_CLI_NEW_PASSWORD instead; without any of them the user has no password. |
-ps | --password-stdin | no | Read the password from standard input (one value; a trailing line break is removed) |
Notes
The password is optional. It is read from standard input (--password-stdin) or from the environment variable OCTO_CLI_NEW_PASSWORD; without either the user is created without a password (there is no prompt). -p/--password is deprecated: it still works in this release but logs a deprecation warning, because a value on the command line ends up in the shell history and the process list; the date of its removal will be announced.
Runs the CK method System.Identity/User.CreateUser-1 through the asset repository (GraphQL); the password travels only in the request body. Requires identity services 3.5.57 or newer with the password methods switched on (Methods:Identity:EnablePasswordMethods); against an older service the command stops with a message naming that version and does not fall back to the REST endpoint. Refusals (e.g. USER_ALREADY_EXISTS, PASSWORD_POLICY_VIOLATION with the codes of the failed rules) are decided by the server and printed as code and message.