It seems like your browser didn't download the required fonts. Please revise your security settings and try again.
Barracuda CloudGen Access

Add and Edit Users in Batch Mode

  • Last updated on

access-cli supports adding and editing users in batch mode, importing data from JSON or CSV files. Batch operations on users use the common batch mode flags.

  • JSON files should contain an array of objects, each containing the fields for each user one wishes to add or edit.
  • CSV files should be comma-separated. They must contain a header, specifying the fields and their order, followed by the records (one per line).

When editing users, unspecified and non-mandatory fields remain unchanged.


The expected fields for each format are as follows:

JSON Field NameJSON TypeCSV Field NameExampleDescriptionMandatory
idintegerID123ID of the user to edit. Used only when editingWhen editing
namestringNameJohn DoeName of the userWhen adding
emailstringEmailjohn@site.comEmail address of the userNo
phone_numberstringPhoneNumber1234567890Phone number of the userNo
group_idsinteger arrayGroupIds[12,56]User group IDs. In CSV, surround by quotesNo
enabledbooleanEnabledtrueWhether the user is enabledNo
falseWhether to send an email invitation. Used only when addingNo

File Examples

Field order can be different from what is shown in the examples, and non-mandatory fields can be omitted. When using CSV, make sure to specify the correct field order in the header, and to maintain the order and number of fields consistent throughout each line.

Adding Users
"name": "User 1", "email": "", "phone_number": "123456",
"group_ids": [34,56], "enabled": true, "send_email_invitation": false
"name": "User 2", "email": "", "phone_number": "644889998",
"group_ids": [], "enabled": true, "send_email_invitation": true
$ access-cli users add --from-file=example.json
User 1,,123456,"[34,56]",true,false
User 2,,644889998,[],true,true

$ access-cli users add --from-file=example.csv --file-format=csv

Editing Users
"id": 12, "name": "User 1", "email": "",
"phone_number": "123456", "group_ids": [], "enabled": false
"id": 34, "name": "User 2", "email": "",
"phone_number": "644889998", "group_ids": [34,56], "enabled": true

$ access-cli users edit --from-file=example.json

12,User 1,,123456,[],false
34,User 2,,644889998,"[34,56]",true

$ access-cli users edit --from-file=example.csv --file-format=csv


Last updated on