Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article helps you to add users to a group in bulk using the app, Run CLI Actions in Confluence.

Instructions

  1. Use the action addUserToGroup with runFromCsv to add users to a group in bulk. 
  2. Prepare a  CSV file (all-users.csv) that contains userId, Username, group name . An example file is shown below: 
    Image Modified
  3. Create a folder with page id (7962625) under the <confluence-home-dir>/script/cli/ directory.

    Image Modified
  4. Copy the .csv file (ex: all-users.csv) to the following location <confluence-home-dir>script/cli/7962625
  5. Run the command below to add users that are provided in the .csv file (all-users.csv, in this example) to a group:

    Code Block
    themeMidnight
    --action runFromCsv --file "all-users.csv" --common "--action addUserToGroup --autoGroup" --continue


    The parameters used in the above action are:

    • file: Name (or path) of the file specified in the command.

    • common: Common parameter string added to all run actions.
    • autoGroup: Groups are automatically added when referenced in add user functions.
    • continueThis parameter can be added, if the user does not exist, and you want the action to continue.

Info
  • Make sure to run the command in a non-production environment before testing in a production environment.

...