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, so you need to manually inform users 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.

While directly synchronizing users' profile field information through CSV import is not possible, you can effectively add profile field information for your users using Haiilo's API. Learn more in API: Updating a user's profile information.

Structure a CSV file

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

Field Type
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 |).
  • A password cannot contain a quotation mark " because it acts as a formatting option. 
    • Note: If no initial password is specified, the user needs to request a password using the Forgot password? functionality. The password won't be overwritten when the user is updated in future CSV uploads.
  • 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. Check Active, if this new user directory should be activated directly
  6. Select the CSV file you want to upload from your computer
  7. 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.
  8. Select Save to start syncing users. If there are any issues in your file, you will see a message indicating the specific errors. Please ensure that your file adheres to the requirements outlined above.

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?

2 out of 7 found this helpful