User directory: CSV import

You can import and synchronize users via a CSV file. Users imported via a CSV file won't receive an automatic welcome email. The admins need to manually inform them about their accounts and login information. 

The CSV user directory imports new users and synchronizes existing users. If a user was previously created through a CSV file but is no longer included in a later uploaded file, the system will handle them based on the settings Synchronization > Orphaned users. If the settings are not set to Ignore, the orphaned users will either be deactivated or deleted, depending on the selected option.

Structure a CSV file

To import your users, you need a file in CSV format. The file should contain the following for each entry:

  • Unique identifier (mandatory)
  • First name (mandatory)
  • Last name (mandatory)
  • Login name (mandatory)
  • Email (optional)
  • Group(s) (optional)
  • Initial password (optional)

The data needs to be in the above order in the columns of the CSV file. Additionally, these requirements should also be followed:

  • The file should not have any headers
  • Fields of an entry should be separated by commas. Optional fields should also be separated by commas, even if they don't contain values.
  • Entries should be separated by a line break.
  • Each cell should be formatted as text.
  • If a user belongs to several groups, the group names should be separated by a pipe (vertical line |).
  • If no initial password is specified, the user should request a password using the Forgot password? functionality. The password won't be overwritten if the user is re-imported (updated).
  • A password cannot contain a quotation mark " because it acts as a formatting option.
  • The format should be UTF-8 without BOM

This is what a CSV file could look like:

Screenshot_2023-03-24_at_15.00.11.png

We have attached an example CSV file to the bottom of this article.

Synchronize users from a CSV file

You need "Manage user directories" permission to create a CSV user directory.

  1. Go to Administration > User directories.
  2. Select Create user directory to add a new user directory.
  3. Enter a name
  4. Choose a type: CSV
  5. Select the CSV file and choose and upload the file from your computer.
    • If the file contains an error, you'll see an error message that shows which column it is in. Ensure that your file follows the requirements detailed above.
  6. Under the Synchronization tab, you can:
    • Activation: Select to automatically active new and restored users found in the file
    • Orphaned users: Choose what should happen to orphaned users, i.e., users included in the CSV file in an earlier import but not in the file at later imports. These can either be ignored, deactivated, or deleted.
    • Restore users: Select if you want to restore deleted or deactivated users if they reappear in a CSV import.
  7. If the CSV file is correct, you can activate the directory to synchronize your users.

After the first import, if you want to upload a new CSV file to update your users, you need to edit the existing CSV user directory in the User directories list. You cannot create a new CSV user directory.

Example CSV file

Was this article helpful?