Import users from a CSV file

1. First of all, you’ll need to prepare a CSV file with the following structure:

  • user_name: user’s full name
  • user_email: user’s email address
  • group_name: user’s group (ex: sales, marketing, team B, etc). Later on, if you create a policy called ‘Sales,’ you can apply it to the group named Sales, and all users in this group will be affected.
  • directory_name: user name in company directory, could be helpful to automatically configure email parameters for example.
  • is_anonymous: to know what is an Anonymous user and how to use it, please read our tutorial Add “Anonymous” users.
    • If this is a normal user, enter “0” in this field (example: John Doe;john.doe@demo.com;Sales;john.doe;0;0;0;custom field 1;custom field 2;custom field 3).
    • To create an anonymous user, put “1” in the field. You can leave <user_email> empty (<;;>), but be sure to specify the <directory_name>. (example: John Doe;;Sales;john.doe;1;0;0;custom field 1;custom field 2;custom field 3).
  • send_email:
    • If you want the user to receive an e-mail containing his login and QR code so that they can enroll their device, enter 1 (example: John Doe;john.doe@demo.com;Sales;john.doe;0;1;0;customfield 1;customfield 2;customfield 3).
    • If you don’t want the user to receive an e-mail, since enrollment will be carried out by you or another MDM manager via the console, enter 0 (example: John Doe;john.doe@demo.com;Sales;john.doe;0;0;0;customfield 1;customfield 2;customfield 3). If the user is anonymous, you can leave this field empty or enter 0, since they won’t receive any e-mail anyway.
  • email_wpco_qr_code:
    • If you want the email sent to the user to contain a QR code so that they can enroll in WPCO mode, enter 1 (example: John Doe;john.doe@demo.com;Sales;john.doe;0;1;1;custom field 1;custom field 2;custom field 3).
    • If you want the user to enroll its device in Fully Managed mode with no authorized personal use, enter 0 (example: John Doe;john.doe@demo.com;Sales;john.doe;0;1;0;custom field 1;custom field 2;custom field 3). If you entered 0 in the previous field (send_email), it doesn’t matter whether you enter 0 or 1 here; no one will send an email.
  • custom_fields: you can add up to 3 personalized fields. If you want to let them empty, put <;;>.

You can create a CSV file via an Excel file. In Excel, click on File -> Export -> Change file type, then select CSV (separator: semicolon) (*.csv) and fill in one column per field.

2. From the Users tab, click on the button Import users, select your CSV file and click on OK.

3. If the upload is successful, the system will create users, and they will appear in the Users tab.. Except if users are anonymous or if you chose not to send them an email, they will receive a QR code and a password via email that they will need to enroll their device later on (using either one).

Duplicate users: in the CSV upload results, if you see the error “Row N°X duplicate user: XXXX”, it’s because the user already exists in your console. Please delete this user from the file or from the console and try again.

Name required: in the CSV upload results, if you see the error “Row N°X name required for anonymous users”, please make sure the field “user_name” is not empty.

Number of fields: in the results window, if you see the error “Line N°X: number of fields must be: 10”, this means that the number of fields in your file is incorrect.