Importing Bulk Users from an external file

This entry guides you through the steps on how to import a bulk amount of new users into Ambience/Repertoire 202x based off a list of users from an external file.

In addition, this entry uses an XLSX file as an example and imports the list of users into both the User module (Authorization) as well as the Identity module (Authentication).

Do note that steps to read an external file may differ from reading an XLSX file.

Prerequisite(s):

  • Do refer to the following entry here on how to read an XLSX file using the ETL module.
  • It is mandatory for your XLSX file to include the columns: “name” and “email”.
  • An example of the ETL chainset as well as the XLSX file used in this entry can be downloaded
    here for your reference.
  • Sample records used as follows:
    image

  1. In the same chainset that was used to create a chain that reads the required XLSX file, create a new chain (i.e. 01 - Add Users) and add the following 3 steps.
    [“Chain Call”, “JSON Record”, “Add User”]

  2. In the step “Chain Call”, configure it to call the chain that reads the required XLSX file. (i.e. 00 - Read Excel)
    image

  3. In the step “JSON Record”, define the “roles” field as an empty array.
    image

  • The “roles” field is a mandatory field for the step “Add User”.
  • This example would import in the list of users with empty roles. Meaning, zero privileges are given at the point of creation.
  • Admin users would be required to create the roles based off the different privileges available and assign the roles to the users as necessary.
  • For more details, do refer to the following entries:
    Privileges
    Roles
    Users
  1. Save the ETL Chain and select the play button to run the chain. If successful, you should be able to see that the success column equals to true for all the users.

  2. Check the users module and you should see the newly created users.

  3. Next, to authenticate the users we would need to add the Identities for each of the newly created user.

  4. In the same chainset, create a new chain (i.e. 02 - Add Identity) and add the following 2 steps.
    [“Chain Call”, “Add Identity”]
    image

  5. In the step “Chain Call”, configure it to call the chain that reads the required XLSX file. (i.e. 00 - Read Excel)
    image

  6. Save the chain and click on the play button to run the chain. If successful, you should be able to see that the success column equals to true for all the users.
    image

  7. In the Identities module, you should be able to see all the newly created identities.