Add users to a group with jf rt group-add-users

Add existing users to an Artifactory group using the jf rt group-add-users command.

Add users to an existing group in Artifactory.

Prerequisites

Before running this command, ensure the following:

  • A JFrog server is configured using jf config add. You can also supply --url and authentication flags directly on each command.
  • You have admin privileges on the Artifactory instance.
  • The target group already exists. Use jf rt group-create to create one first.
  • All users to be added already exist in Artifactory. Use jf rt users-create to create users.

Synopsis

jf rt group-add-users <group-name> <users-list> [options]

Aliases: rt gau

Arguments

This command takes the following arguments.

ArgumentRequiredDescription
<group-name>YesThe name of the group
<users-list>YesComma-separated list of usernames: user1,user2,...

Options

This command supports the following options.

FlagDefaultDescription
--access-tokenJFrog access token
--passwordJFrog password (for authentication)
--server-idServer ID configured using the jf config command. Required if no default server is configured.
--ssh-key-pathSSH key file path
--ssh-passphraseSSH key passphrase
--urlJFrog Artifactory URL (example: https://acme.jfrog.io/artifactory). Required if --server-id is not provided.
--userJFrog username

Examples

Add a Single User

To add one user to a group:

  • Run:
jf rt group-add-users <group-name> <users-list>

Where:

  • <group-name> — target group (see Arguments).
  • <users-list> — one or more comma-separated usernames.

Full example:

jf rt group-add-users developers alice

Expected output:

[Info] Done adding user(s) to group developers.

Add Multiple Users

To add multiple users to a group:

  • Run:
jf rt group-add-users <group-name> <users-list>

Full example:

jf rt group-add-users developers alice,bob,charlie

Expected output:

[Info] Done adding user(s) to group developers.

Display Command Help

To view command help:

  • Run:
jf rt group-add-users --help

Important Notes

  • Requires admin privileges on the Artifactory instance.
  • Users must already exist in Artifactory before running this command. If one or more usernames do not exist, the command returns a 404 Not Found error with no indication of which user was not found. Create missing users first with jf rt users-create, then retry. To confirm all users were added successfully, check group membership in the Artifactory UI (Administration > Identity and Access > Groups).
  • Adding users to a group does not change their existing group memberships — it only adds them to the specified group.
  • Users inherit all permissions assigned to the group's permission targets immediately.

Frequently Asked Questions

plusFAQs
Q: How do I add users to an Artifactory group?

A: Run jf rt group-add-users <group-name> <users-list> with a comma-separated list of usernames. See Add a Single User and Add Multiple Users for examples.

Q: What happens if I add a username that doesn't exist?

A: The command returns a 404 Not Found error without indicating which user was not found. Create missing users first with jf rt users-create, then retry.

Q: What do I need before running jf rt group-add-users?

A: Admin privileges on the Artifactory instance, an existing target group, and users that already exist in Artifactory. See Prerequisites.

Q: Does adding users to a group remove them from other groups?

A: No. Adding users to a group only adds them to that group — it does not change their existing group memberships.

Q: Do users get the group's permissions right away?

A: Yes. Users inherit all permissions assigned to the group's permission targets immediately after being added.

Related Topics



What’s Next

Next, assign permissions to the group.

Did this page help you?