Support Center

Updating Users From a CSV File

Updating 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 prepopuated with JumpCloud user information which admins then populate with user upates and import with the second command Update-JCUsersFromCSV.

  • Need to install the module? The module can be installed on Mac, Windows and Linux in a few quick steps.

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 systems with either standard or administrator 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 applications
  • Grant JumpCloud users permissions to JumpCloud System Groups
  • Add JumpCloud users to JumpCloud LDAP and Radius
  • Add JumpCloud users to the JumpCloud Office 365 or G Suite directory level integrations
    • Takeover existing or provision new user accounts in Office 365 or G Suite

* Custom attributes are only presented over the JumpCloud API. Custom attributes are not presented over JumpCloud LDAP.

Step 1 : Creating the CSV update file

The command New-JCImportTemplate creates a blank CSV update file which can be prepopulated with JumpCloud user information on a JumpCloud admins local machine.

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

New-JCImportTemplate

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 by default created within the current working directory of the PowerShell session.

To create the file in this location press 'Y'.

If you wish to choose a different output location press 'N' and provide a full path to the folder where you wish 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 update file enter "U"

If you wish to instead create a CSV import file enter "N" at this prompt and refer to the knowledgbase article for importing new users from a csv.

Question 3

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 prepopulated 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 wish to add this information to the file.

* Your JumpCloud API key can be found in the JumpCloud admin console within 'API Settings' accessible from the drop down icon next to the admin email address in the top right corner of the JumpCloud admin console.

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: 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 bind your new users to existing JumpCloud systems during import?
Enter Y for Yes or N for No:

In order to leverage this feature the JumpCloud agent must first be installed on the systems you wish to manage. JumpCloud systems are identified by their SystemID.

By pressing '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 current working directory containing all JumpCloud systems and the SystemID for these systems. This file is named JCSystems_CurrentDate.csv.

Question 8

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

Users can be added to JumpCloud User groups during import. Note if you wish to add users to groups these groups must already be created within the JumpCloud admin console. Enter 'Y' at this prompt to add columns in the CSV update file for group additions.

Do you want to add the new users to JumpCloud 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 you wish to add a single user to. For example if I wished to add my imported users to four groups 'Denver', 'AllEmployee', 'Office365', and 'Admins' I would enter '4' at this prompt. Note this does not mean that I have to add all imported users to four groups.

Question 9

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 JumpCloud API. Custom attributes are not presented over JumpCloud LDAP. Enter 'Y' at this prompt if you wish 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 you wish to add a single user to. For example if I wished to add three attributes 'Favorite Food', 'Birthday', and 'Emergency Contact' I would enter '3' at this prompt. Note this does not mean that I have to add three attributes to all users.

Creating file JCUserUpdateImport_09-27-2018.csv in the location /Users/sreed

Do you want to open the file JCUserUpdateImport_09-27-2018.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 systems default CSV editor.

Step 2 : 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 system associations, or JumpCloud groups additions.

Expert tips

  • Only fields populated with information will get updated per user.
  • Fields can be left blank.
  • You do not need to add information for each user for each update field.
  • It is very important the column headings names are not modified or edited as these values are dependencies for the Update-JCUsersFromCSV command.

Find below an example of a CSV file filled out with update information 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,,

Step 3 : Importing the CSV update file

Once the update CSV template has been filled out with end user information and saved it is 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 pass in your JumpCloud API key to authenticate the PowerShell session to the JumpCloud API.

  • Your JumpCloud API key can be found in the JumpCloud admin console within 'API Settings' accessible from the drop down icon next to the admin email address in the top right corner of the JumpCloud admin console.
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 navigate in the terminal 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 will 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 :

 

Last Updated: Sep 28, 2018 02:02PM MDT

Related Articles
desk-forwarding@jumpcloud.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete