Create users from a CSV with jf rt users-create

Create new users in Artifactory from a CSV file with usernames, passwords, and emails.

Synopsis

jf rt users-create --csv <path> [options]

Aliases: rt uc

Arguments

ArgumentRequiredDescription
No positional arguments. Use --csv for the file path

Options

FlagRequiredDefaultDescription
--access-tokenNoJFrog access token
--csvYesPath to a CSV file. First row must be headers: username, password, email
--passwordNoJFrog password (for authentication)
--replaceNofalseWithout this flag, users that already exist are skipped. Set to true to overwrite existing users' password and email instead
--server-idNoServer ID configured using the jf config command
--ssh-key-pathNoSSH key file path
--ssh-passphraseNoSSH key passphrase
--urlNoJFrog Artifactory URL (example: https://acme.jfrog.io/artifactory)
--userNoJFrog username
--users-groupsNoComma-separated list of groups for the new users to join. Groups must already exist in Artifactory before running this command

Examples

Create Users from a CSV File

To create users from a CSV file:

  1. Create a CSV file with the user details (see CSV Format below):
username,password,email
alice,Secret1!,[email protected]
bob,Secret2!,[email protected]
  1. Save it as users.csv, then run:
jf rt users-create --csv <path>

Where:

  • <path> — path to your CSV file (for example ./users.csv).

Full example:

jf rt users-create --csv ./users.csv

Expected output:

[Info] Creating user alice...
[Info] Creating user bob...
[Info] Done creating 2 users.

Create Users with Group Assignment

The groups developers and readers must already exist in Artifactory before running this command.

To create users from a CSV and assign groups:

  1. Use a CSV file in the format described in CSV Format.
  2. Run:
jf rt users-create --csv <path> --users-groups <group-list>

Where:

  • <path> — path to the CSV file.
  • <group-list> — comma-separated Artifactory group names (no spaces), for example developers,readers.

Full example:

jf rt users-create --csv ./users.csv --users-groups developers,readers

Expected output:

[Info] Creating user alice...
[Info] Creating user bob...
[Info] Done creating 2 users.

Replace Existing Users

Use --replace when users in the CSV already exist and you want to overwrite their password and email. Without this flag, existing users are skipped.

To replace existing users from a CSV:

  1. Run:
jf rt users-create --csv <path> --replace

Where:

  • <path> — path to the CSV file.

Full example:

jf rt users-create --csv ./users.csv --replace

Expected output:

[Info] Creating user alice...
[Info] Creating user bob...
[Info] Done creating 2 users.

CSV Format

The CSV file must contain these headers in the first row: username, password, email.

username,password,email
alice,secret1,[email protected]
bob,secret2,[email protected]

When to Use

Use jf rt users-create for bulk user provisioning — for example, when onboarding an entire team or migrating users from another system. Prepare a CSV file and run a single command.

Typical onboarding workflow:

To onboard a new team with groups and permissions:

  1. Create the groups (skip if they already exist). See jf rt group-create for details.
jf rt group-create developers
jf rt group-create readers
  1. Create users and assign them to the groups:
jf rt users-create --csv ./new-team.csv --users-groups developers,readers
  1. Set up a permission target for the team. Generate a template with jf rt permission-target-template, fill in the repositories and actions, then apply it:
jf rt permission-target-update ./team-permissions.json

Troubleshooting

ErrorLikely CauseResolution
401 Token failed verificationExpired or missing access tokenRe-authenticate: run jf config add to reconfigure your server
CSV must include headersFirst row is missing or misspelledEnsure the first row is exactly username,password,email
403 ForbiddenInsufficient privilegesConfirm your account has Admin rights on the Artifactory instance
Users created but not added to groupGroup name does not existCreate the group first with jf rt group-create <group-name>, then re-run
👍

Tip

If the CLI reports a server-side error, it also prints a Trace ID (for example, [Info] Trace ID for JFrog Platform logs: abc123). Include this ID when contacting JFrog Support to speed up diagnosis.

Important Notes

  • The CSV file must have headers: username, password, email in the first row.
  • Requires admin privileges on the Artifactory instance.
  • Use --replace to update existing users if they already exist.
  • Passwords in the CSV are sent over HTTPS. Do not commit CSV files with real passwords to version control.
  • Restrict the file's permissions before use to prevent other users on the system from reading plaintext passwords:
    chmod 600 users.csv


What’s Next

To remove users, see jf rt users-delete.