Update Users from a CSV File

The JumpCloud PowerShell Module contains two commands designed to be used in tandem to update existing JumpCloud users from a CSV file. The first command, New-JCImportTemplate, creates the CSV update template file on the local machine populated with JumpCloud user information which admins can then add user updates to and import with the second command, Update-JCUsersFromCSV.

Note:

If you want to create a CSV import file instead, refer to Importing New Users from a CSV.

The JumpCloud PowerShell Module can be installed on Mac, Windows and Linux devices in a few quick steps, see our GitHub repo, Installing the JumpCloud PowerShell Module to learn more.

Using this update workflow, JumpCloud Admins can:

  • Add attributes to existing JumpCloud users.
  • Update attributes on existing JumpCloud users.
  • Add JumpCloud users to JumpCloud user groups.
  • Bind JumpCloud users to JumpCloud devices with either standard or Admin system permissions.
  • Add custom attributes* to JumpCloud users.

By adding JumpCloud users to JumpCloud user groups, Admins can:

  • Grant JumpCloud users access to JumpCloud SSO apps.
  • Grant JumpCloud users permissions to JumpCloud Device Groups.
  • Add JumpCloud users to JumpCloud LDAP and Radius.
  • Add JumpCloud users to the JumpCloud Microsoft 365 or Google Workspace directory level integrations.
  • Take over existing user accounts or provision new user accounts in Microsoft 365 or Google Workspace.

Note:

Custom attributes are only presented over the JumpCloud API. Custom attributes aren't presented over JumpCloud LDAP.

Creating the CSV Update File

The command New-JCImportTemplate creates a blank CSV update file that can be populated with JumpCloud user information on a JumpCloud admin's local machine.

To run the command, open a PowerShell terminal that has the JumpCloud PowerShell module installed, and enter the PowerShell command at the prompt.

New-JCImportTemplate

Question 1

PS /Users/[user]> New-JCImportTemplate

cmdlet New-JCImportTemplate at command pipeline position 1
Supply values for the following parameters:
(Type !? for Help.)
Type:

Enter "Update" to begin updating the import template file.

The CSV file will be created within the directory:
/Users/[user]
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, enter 'Y'. If you want to choose a different output location, enter 'N' and provide a full path to the folder where you want to create the file.

Question 2

Would you like to populate this update template with all of your existing users?
You can remove users you do not wish to modify from the import file after it is created.
Enter Y for Yes or N for No:

An update file can be populated with the usernames of all existing JumpCloud users. Enter "Y" at this prompt to add all existing users to the CSV update file or "N" if you do not want to add this information to the file.

Question 3

Would you like to update users email addresses?
Enter Y for Yes or N for No:

Enter "Y" at this prompt to update existing users' email addresses in the CSV update file or "N" if you do not want to update this information.

Question 4

Do you want to add extended user information attributes available over JumpCloud LDAP to your users during import?
Extended user information attributes include: AlternateEmail, Manager, ManagedAppleId, MiddleName, preferredName, jobTitle, employeeIdentifier, department, costCenter, company, employeeType, description, and location
Enter Y for Yes or N for No:

To add columns to the update file for updating extended user information attributes, enter "Y" at the prompt. Fields to update all extended user information attributes will be added to the update file. Only fields populated with information will be updated.

Question 5

Do you want to add extended user location attributes available over JumpCloud 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 update file for updating location attributes, enter "Y" at the prompt. Fields to update all location attributes will be added to the update file. Only fields populated with information will be updated.

Question 6

Do you want to add extended user telephony attributes available over JumpCloud 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 update file for updating telephony attributes, enter "Y" at the prompt. Fields to update all telephony attributes will be added to the update file. Only fields populated with information will be updated.

Question 7

Do you want to set unix UID/GUID values during import?
UID/GUID value attributes include: unix_uid, unix_guid
Enter Y for Yes or N for No:

To add columns to the update file for UID/GUID values, enter "Y" at the prompt. Columns will be added to the update file. Only fields populated with information will be updated.

Question 8

Do you want to require MFA to user?
enable_user_portal_multifactor, EnrollmentDays
Enter Y for Yes or N for No:

To add columns to the update file for enabling MFA for User Portal logins and setting the number of enrollment days (enrollment period), enter "Y" at the prompt.

Question 9

Do you want to bind the user to LDAP during import
ldap_Binding_User, ldapserver_id
Enter Y for Yes or N for No:

To add columns to the update file for setting the LDAP BindDN and binding users to an LDAP server, enter "Y" at the prompt.

Question 10

Do you want to bind your users to existing JumpCloud systems during import?
Enter Y for Yes or N for No:

By entering 'Y' at this prompt, you'll be asked for your JumpCloud API Key. This API Key will be used to authenticate to the JumpCloud API to create a CSV file in a current working directory containing all JumpCloud devices and the SystemID for these devices. This file is named JCSystems_CurrentDate.csv.

Question 11

Do you want to add the users to JumpCloud user groups during import?
Enter Y for Yes or N for No:

If 'Y',

What is the maximum number of custom attributes you want to add to a single user during import? ENTER A NUMBER:

Users can be added to JumpCloud user groups during import. Note that if you want to add users to groups, these groups must already be created within the JumpCloud Admin Portal. Enter 'Y' at this prompt to add columns in the CSV update file for group additions.

Question 12

Do you want to add any custom attributes to your users during import? Note, customAttribute values must be unique.
Enter Y for Yes or N for No:

Custom attributes are only presented over the JumpCloud API. Custom attributes aren't presented over JumpCloud LDAP. Enter 'Y' at this prompt if you want to add custom attributes to your users during import.

Question 13

Creating file JCUserUpdateImport_MM-DD-YYYY.csv in the location /Users/[user]

Do you want to open the file JCUserUpdateImport_MM-DD-YYYY.csv?
Enter Y for Yes or N for No:

After answering all questions, the update file will be located in the current working directory of the PowerShell session. Enter 'Y' at this prompt to open the file in the system's default CSV editor.

Populating the CSV Update File

After creating a CSV update file using the steps described above, JumpCloud Admins can populate this CSV update file with their end user information and fill in the related fields for attributes, JumpCloud device bindings, or JumpCloud groups additions.

Expert Tips

  • Only fields populated with info will get updated per user.
  • Fields can be left blank.
  • You don’t need to add info for each user for each update field.
  • If you’re using a custom attribute “WorkdayID,” note that each input value must be unique per user. See Integrate with Workday to learn more.
  • It’s very important that the column headings names are not modified or edited, as these values are dependencies for the Update-JCUsersFromCSV command.

The example below is a CSV file filled out with update info for three users:

"Username","mobile_number","home_number","work_number","work_mobile_number","work_fax_number"
nnickerson,123-456-777,,777,,
hflax,123-456-888,,888,,
dvickers,123-456-999,,999,,

Importing the CSV Update File

Once the update CSV template has been filled out with end user info and saved, it's ready to be imported using the command Update-JCUsersFromCSV.

To run the command, open a PowerShell terminal and, at the prompt, enter the PowerShell command Connect-JCOnline and put in your JumpCloud API key to authenticate the PowerShell session to the JumpCloud API.

Considerations:

  • Your JumpCloud API key can be found in the JumpCloud Admin Portal. In the top right, click your initials, then My API Key. If you don’t have API key access, see JumpCloud APIs to learn more.
  • Some attributes that can be updated via CSV require additional validation. See Use the Manager Attribute in the Admin Portal and API for more information.

Connect-JCOnline lu8792c9d4y2398is1tb6h0b83ebf0e92s97t382
Successfully connected to JumpCloud
Module up-to-date. New LDAP attributes are live! Use Update-JCUsersFromCSV to add them in bulk.

After successfully connecting to JumpCloud, in the terminal go to the location of the update CSV file.

PS /Users/buster/Desktop/Import Files> dir

Directory: /Users/buster/Desktop/Update Files

Mode LastWriteTime Length Name
---- ------------- ------ ----
------ 9/28/18 1:12 PM 443 JCUserUpdateImport_09-28-2018.csv

The 'dir' command which is alias for the command Get-ChildItem returns all the items in the current directory.

In this example you'll see the update CSV file 'JCUserUpdateImport_09-28-2018.csv' is within the current directory.

Next, run the Update-JCUsersFromCSV command and enter the full path to the CSV update file to the -CSVFilePath parameter.

If you have 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.

Update-JCUsersFromCSV -CSVFilePath ./JCUserUpdateImport_09-28-2018.csv

The CSV file will be validated and admins will be presented with a 'Y'/'N' prompt to confirm the update or quit.

Import Summary:

Number Of Users To Update = 3

Would you like to update these users?

Press Y to confirm or N to quit:

If 'Y' is entered, Admins will be presented with a update summary after the update completes.

A loading bar will show progress of the update.

Import Summary:

Number Of Users To Update = 3

Would you like to update these users?

Press Y to confirm or N to quit: y

Username : nnickerson
Status : User Updated
UserID : 5b4781bce3c61c2f3940f2b6
GroupsAdd : {}
SystemID :
SystemAdd :

Username : hflax
Status : User Updated
UserID : 5b4781bc4907674a1e7bc382
GroupsAdd : {}
SystemID :
SystemAdd :

Username : dvickers
Status : User Updated
UserID : 5b4781bd23e457661be364ca
GroupsAdd : {}
SystemID :
SystemAdd :

Back to Top

List IconIn this Article

Still Have Questions?

If you cannot find an answer to your question in our FAQ, you can always contact us.

Submit a Case