Follow

Exporting your data from Active Directory (AD)

 

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

Here is what you need to know:

  • It's a one-way export. Jostle never modifies data in AD, although you can export a CSV from Jostle and import it into AD manually if you ever need to.
  • The import only creates new users in Jostle, or updates existing ones - it never deletes people.
  • Any fields with blank values or missing columns are simply ignored, so you can decide which fields you push to Jostle without deleting existing data in Jostle.

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 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 contributors.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 whenever).

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:\jostleContributors.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

 

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:

  • 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.

 

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.