Follow

How to export Active Directory users to CSV in Jostle

As a first step to getting your data into Jostle you might want to export it from AD.

Notes:

  • It's a one-way export from AD to Jostle and not a two-way sync.
  • Importing creates new Jostle Users and updates data for existing ones. Deleting Users is a separate process at Admin Settings > User Data To/From Other Systems > Delete Users (CSV).
  • Provided you have not enabled blank fields, any fields with blank values or missing columns are simply ignored.

The process requires two steps, both of which can be scheduled:

1. Export the data from AD to a CSV file
2. Upload that CSV into Jostle

1. Export the data from AD to a CSV file

There are two options:

Option A

You can do this with CSVDE or any other tool you want like VBScript, powershell, SSIS - anything that can create a CSV file from AD. CSVDE is included with AD, so you can run something like this from the command line on your AD server:

csvde -d "cn=Users,dc=saml,dc=jostle,dc=com" -r "(objectClass=person)" -f jostleUsers.csv -l "dn,cn,givenName,sn,title,mail,mobile,telephoneNumber,department" -s localhost

The -r filter and the -d (distinguished name) are likely to be different based on your settings. If you want to have this happen automatically put it in a batch file and schedule it to run once a day (or any frequency).

Option B

You can use Get-ADUser command using PowerShell. Here’s an example:

Get-ADUser -filter * -properties givenName,sn,userPrincipalName,telephoneNumber |
select-object givenName,sn,userPrincipalName,telephoneNumber | Export-Csv -Path C:\jostleUsers.csv -NotypeInformation

-filter * = get information from all the different tabs in an AD User’s account

-properties = which fields from AD you’d like to export

-select-object = what order you’d like them to appear in the export

Export-csv = the type of file you’d like the export to be in (Jostle only accepts CSV files)

-Path = where you’d like the export to be stored. It needs to include the file name

-NoTypeInformation = removes an AD header that would appear in your export file

You can save this in a file as .ps1 and run it whenever you want.

If you want to export your data automatically put it in a batch file and schedule it to run once a day (or whenever).

Note: You can also use this method to export your organizational chart data , like so:

Get-ADUser -filter * -properties * -SearchScope Subtree | 
select userPrincipalName, Title, @{n="ManagerMail";e={get-aduser $_.manager -properties mail | select -ExpandProperty mail}}, department | Export-Csv -Path C:\uploadTeams.csv -NotypeInformation

With some adjustment, the scripts also work on Microsoft Entra ID.

2. Import the CSV to Jostle 

Once Step 1 has succeeded, you can choose one of the following methods to get your data into Jostle:

  • Have a System Admin import the resulting CSV file into Jostle by following the instructions here.
  • You can also automate your import via SFTP.
  • Alternatively, if you already have an SFTP account, you can create a script file and set up a task to automatically upload your files, as shown here.

Tip: If your AD export has fields you do not want to import or update into Jostle, delete those columns from the CSV file prior to import.

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.