The contains two CSV import-specific commands designed to be used in tandem for importing users into ºÚÁϺ£½Ç91Èë¿Ú from a CSV file. The first command creates the .CSV import template file on the local machine, which administrators then populate with their end user information and import with the second command.
Need to install the module? The module can be installed on Mac, Windows, and Linux in a .
Using this import workflow, ºÚÁϺ£½Ç91Èë¿Ú administrators can:
- Create ºÚÁϺ£½Ç91Èë¿Ú users.
- Add ºÚÁϺ£½Ç91Èë¿Ú users to ºÚÁϺ£½Ç91Èë¿Ú user groups.
- Bind ºÚÁϺ£½Ç91Èë¿Ú users to ºÚÁϺ£½Ç91Èë¿Ú systems with either standard or administrator system permissions.
- Add custom attributes to ºÚÁϺ£½Ç91Èë¿Ú users.
By adding ºÚÁϺ£½Ç91Èë¿Ú users to ºÚÁϺ£½Ç91Èë¿Ú user groups during import, administrators can:
- Grant ºÚÁϺ£½Ç91Èë¿Ú users access to ºÚÁϺ£½Ç91Èë¿Ú SSO applications.
- Grant ºÚÁϺ£½Ç91Èë¿Ú users permissions to ºÚÁϺ£½Ç91Èë¿Ú System Groups.
- Add ºÚÁϺ£½Ç91Èë¿Ú users to ºÚÁϺ£½Ç91Èë¿Ú LDAP and Radius.
- Add ºÚÁϺ£½Ç91Èë¿Ú users to the ºÚÁϺ£½Ç91Èë¿Ú Microsoft 365 or Google Workspace directory integrations.
- Take over existing user accounts or provision new user accounts in Microsoft 365 or Google Workspace.
Considerations:
- Each user you import must be a unique user with a unique email address.
- The user state assigned to these imported users, staged or active, is determined by the setting under: Settings > User Management > Default User State for User Creation > CSV Import / Bulk User API Import.
- Don't import users that you don't intend to manage with ºÚÁϺ£½Ç91Èë¿Ú. You have 48 hours to remove unwanted users and to contact your Technical Account Manager to avoid being charged for any users you remove after import.
- You can also import users via CSV in the Admin Portal. See Add Users to the Admin Portal.
- Custom attributes are only presented over the ºÚÁϺ£½Ç91Èë¿Ú API. Custom attributes aren’t presented over ºÚÁϺ£½Ç91Èë¿Ú LDAP.
Active users created with a password aren’t sent an activation email on CSV import. If you do NOT want ºÚÁϺ£½Ç91Èë¿Ú to send emails to your users, you MUST set user passwords. Note that emails will never be trigger for users created as staged.
Creating the CSV Import File
The command New-JCImportTemplate
creates a blank CSV import file on a ºÚÁϺ£½Ç91Èë¿Ú administrator's local machine.
To run the command, open a PowerShell terminal and enter the PowerShell command at the prompt:
New-JCImportTemplate
After running the command, administrators will be asked a series of interactive questions in the terminal. The answers to these questions will define the column headers that are added to the CSV template file that is created by this command. The questions that are asked are shown below.
Question 1
The CSV file will be created within the directory:
/Users/buster
Enter Y to confirm or N to change output location:
This file is created within the current working directory of the PowerShell session by default.
- To create the file in this location, press Y.
- If you want to choose a different output location, press N and provide a full path to the folder where you want to create the file.
Question 2
Do you want to create an import CSV template for creating new users or for updating existing users?
Enter "N" for to create a template for new users
Enter "U" for creating a template for updating existing users
Enter N for 'new users' or U for 'updating users':
- To create a CSV new user import file, press N.
- If you want to create a CSV update file instead, press U at this prompt and refer to the article Update Users from a CSV File.
Question 3
Do you want to add extended user information attributes available over ºÚÁϺ£½Ç91Èë¿Ú LDAP to your users during import?
Extended user information attributes include: MiddleName, preferredName, jobTitle, employeeIdentifier, department, costCenter, company, employeeType, description, and location
Enter Y for Yes or N for No:
- To add columns to the import file for adding extended user information attributes, enter Y at the prompt.
- Fields to import all extended user information attributes will be added to the import file.
- Only fields populated with information will be imported.
Question 4
Do you want to add extended user location attributes available over ºÚÁϺ£½Ç91Èë¿Ú LDAP to your users during import?
Extended user location attributes include: home_streetAddress, home_poBox, home_city, home_state, home_postalCode, home_country, work_streetAddress, work_poBox, work_city, work_state, work_postalCode, work_country
- To add columns to the import file for adding location attributes, enter Y at the prompt.
- Fields to import all location attributes will be added to the import file.
- Only fields populated with information will be imported.
Question 5
Do you want to add extended user telephony attributes available over ºÚÁϺ£½Ç91Èë¿Ú LDAP to your users during import?
Extended user telephony attributes include: mobile_number, home_number, work_number, work_mobile_number, work_fax_number
- To add columns to the import file for adding telephony attributes, enter Y at the prompt.
- Fields to import all telephony attributes will be added to the update file.
- Only fields populated with information will be imported.
Question 6
Do you want to bind your new users to existing ºÚÁϺ£½Ç91Èë¿Ú systems during import?
Enter Y for Yes or N for No:
ºÚÁϺ£½Ç91Èë¿Ú users can be bound to ºÚÁϺ£½Ç91Èë¿Ú devices during import. To leverage this feature, the ºÚÁϺ£½Ç91Èë¿Ú agent must first be installed on the devices you want to manage. ºÚÁϺ£½Ç91Èë¿Ú devices are identified by their SystemID.
By pressing Y at this prompt, you'll be asked for your ºÚÁϺ£½Ç91Èë¿Ú API key. This API key will be used to authenticate to the ºÚÁϺ£½Ç91Èë¿Ú API to create a .CSV file in the home folder of the logged-in user that contains all ºÚÁϺ£½Ç91Èë¿Ú devices, as well as the SystemID for these systems. This file is named JCSystems_CurrentDate.csv.
Question 7
Do you want to add the new users to ºÚÁϺ£½Ç91Èë¿Ú user groups during import? Enter Y for Yes or N for No:
Users can be added to ºÚÁϺ£½Ç91Èë¿Ú User groups during import.
If you want to add users to groups, these groups must already be created within the ºÚÁϺ£½Ç91Èë¿Ú Admin Portal. Enter Y at this prompt to add columns in the CSV import template for group additions.
Do you want to add the new users to ºÚÁϺ£½Ç91Èë¿Ú user groups during import? Enter Y for Yes or N for No: y
What is the maximum number of groups you want to add a single user to during import? ENTER A NUMBER:
If Y is entered, enter a numeric value for the MAXIMUM number of groups to which you want to add a single user. For example, if I wanted to add my imported users to groups Denver, AllEmployee, Microsoft 365, and Admins, I would enter 4 at this prompt.
This doesn’t mean that I have to add all imported users to four groups.
Question 8
Do you want to add any custom attributes to your users during import? Enter Y for Yes or N for No:
Custom attributes are only presented over the ºÚÁϺ£½Ç91Èë¿Ú API. Custom attributes aren’t presented over ºÚÁϺ£½Ç91Èë¿Ú LDAP. Enter Y at this prompt if you want to add custom attributes to your users during import.
Do you want to add any custom attributes to your users during import? Enter Y for Yes or N for No: y
What is the maximum number of custom attributes you want to add to a single user during import? ENTER A NUMBER:
If Y is entered, enter a numeric value for the MAXIMUM number of attributes to which you want to add a single user. For example, if I wanted to add attributes Favorite Food, Birthday, and Emergency Contact, I would enter 3 at this prompt.
This doesn’t mean that I have to add three attributes to all users.
Creating file JCUserImport_03-14-2015.csv in the location /Users/buster
Do you want to open the file JCUserImport_03-14-2015.csv? Enter Y for Yes or N for No:
After answering all questions, the import file will be located in the home directory of the logged in user. Enter Y at this prompt to open the file in the system's default CSV editor.
Populating the CSV Import File
After creating a CSV import template using the steps described above, ºÚÁϺ£½Ç91Èë¿Ú administrators can populate this CSV import file with their end user information and fill in the related fields for custom attributes, ºÚÁϺ£½Ç91Èë¿Ú system associations, or ºÚÁϺ£½Ç91Èë¿Ú groups.
- ºÚÁϺ£½Ç91Èë¿Ú usernames and email addresses must be unique for each ºÚÁϺ£½Ç91Èë¿Ú user. A single username or email address can't be used twice.
- If a custom attribute "WorkdayID" is added to the CSV template, each input value must be unique per user. For more information about Workday users, see Integrate with Workday.
- If end user information lives in an external directory, it may be advantageous to export this information to a CSV format, then copy and paste this information into the import CSV file to save time.
- It’s very important that the column headings names aren't modified or edited, as these values are dependencies for the Import-JCUsersFromCSV command.
- If binding users to systems, the 'Administrator' field takes a "$True/$False" value.
- When set to $True, users will be given administrator permissions.
- When set to $False, users will be set as standard users.
- If left blank, users will be created as standard users by default.
Find below an example .CSV file filled out with information for three users:
FirstName,LastName,Username,Email,Password,Nate,Nickerson,nnickerson,[email protected],P@ssword1! Holly,Flax,hflax,[email protected],P@ssword1!@,Deangelo,Vickers,dvickers,[email protected],P@ssword1!
Importing the CSV Import File
Once the import CSV template has been filled out with end-user information and saved, it's ready to be imported using the command .
To run the command, open a PowerShell terminal, enter the PowerShell command at the prompt, and pass in your ºÚÁϺ£½Ç91Èë¿Ú API key to authenticate the PowerShell session to the ºÚÁϺ£½Ç91Èë¿Ú API.
Your ºÚÁϺ£½Ç91Èë¿Ú API key can be found in the ºÚÁϺ£½Ç91Èë¿Ú Admin Portal within API Settings, accessible from the icon in the top right corner of the ºÚÁϺ£½Ç91Èë¿Ú Admin Portal.
Connect-JCOnline
After successfully connecting to ºÚÁϺ£½Ç91Èë¿Ú, navigate in the terminal to the location of the import .CSV file.
PS /Users/buster/Desktop/Import Files> dir
Directory: /Users/buster/Desktop/Import
Files Mode LastWriteTime Length Name
---- ------------- ------ ---- ------
3/14/15 9:26 AM 535 JCUserImport_03-14-2015.csv
The dir
command, which is an alias for the command , returns all the items in the current directory.
In this example, you will see the import CSV file JCUserImport_03-14-2015.csv is within the current directory.
Next, run the command and enter the full path to the CSV import file to the CSVFilePath parameter.
If you've navigated to the directory where the CSV file lives in the PowerShell session, all that must be entered for this parameter is the name of the CSV import file.
Import-JCUsersFromCSV -CSVFilePath JCUserImport_03-14-2015.csv
The CSV file will be validated to ensure that there are no username or email address collisions, and any systems or groups that are being added will be validated to ensure they exist.
After validation, administrators will be presented with a Y/N prompt to either confirm the import or quit.
Import Summary:
Number Of Users To Import = 3
Would you like to import these users?
Press Y to confirm or N to quit:
If Y is entered, administrators will be presented with an import summary after the import completes.
Hang tight! Creating your users. DO NOT shutdown the console.
Feel free to watch your user count increase in the ºÚÁϺ£½Ç91Èë¿Ú admin console!
It takes ~ 1 minute per 100 users.
Username : nnickerson
Status : User Created
UserID : 5b4781bce3c61c2f3940f2b6
GroupsAdd : {}
SystemID :
SystemAdd :
Username : hflax
Status : User Created
UserID : 5b4781bc4907674a1e7bc382
GroupsAdd : {}
SystemID :
SystemAdd :
Username : dvickers
Status : User Created
UserID : 5b4781bd23e457661be364ca
GroupsAdd : {}
SystemID :
SystemAdd :
Pre-Compiled Binary
ºÚÁϺ£½Ç91Èë¿Ú also provides a precompiled binary within our API Utility rollup. Download the latest rollup on . The uncompressed package will contain the file CSVImporter_ os_arch.
Using CSVImporter
Linux / Mac OS X
# ./CSVImporter_darwin_amd64
Usage of ./CSVImporter:
-csv="": -csv=<filename>
-key="": -key=<API-key-value>
# ./CSVImporter_darwin_amd64 -csv="PATH_TO_CSV" -key="YOUR_API_KEY"
Windows
PS C:\Users\Administrator\Downloads> .\CSVImporter_windows_amd64.exe
Usage of ./CSVImporter:
-csv="": -csv=<filename>
-key="": -key=<API-key-value>
PS C:\Users\Administrator\Downloads> .\CSVImporter_windows_amd64.exe -csv="PATH_TO_CSV" -key="YOUR_API_KEY"
Building the CSV File
Considerations:
- A minimum of nine (9) fields is required.
- Username and email are required.
- If SUDO Access is left blank, the user will be granted Global Administrator permissions.
- Email addresses must be all lowercase.
- If the password isn't set, the user will receive an email to complete registration. Setting the password will bypass that step and immediately activate the user.
Importing Only a User
The exported CSV should look like this:
,,jdoe,[email protected],,,FALSE,,
Some spreadsheet programs might not output commas when the column has no values. One possible workaround is to add a space in the empty column. A space can be used for an empty value to overcome this.
Other Fields
- (Optional) UID/GID: If the global setting Enable UID/GID management for users is enabled in Settings, the UID and GID will be automatically assigned. Otherwise, specify the desired values.