Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

This integration is deprecated in favor of API integration.

This document provides instructions on how to use a PowerShell script that connects to JumpCloud and queries user accounts and saves them in a CSV file to import the data into your application instance in Zilla. The CSV file is saved locally and also gets uploaded to the SFTP server. This CSV file is used to sync the data to Zilla using CSV import. Once the CSV import is successful, SFTP can be configured and scheduled.

...

Info

If you do not have PowerShell installed on your machine, please refer to https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell?view=powershell-7.2.

Steps to run the Script

  1. Copy files (JCscript.ps1 and config.json) to a directory. cd into this directory.

  2. Open PowerShell with run as administration in Windows, or a terminal window on Mac and Linux which you have launched in PowerShell by running the command pwsh. Enter the command:

    Code Block
    languagepowershell
    Install-Module JumpCloud
  3. When prompted, Press Y to install the JumpCloud PowerShell module.

  4. Execute the command below to install Posh SSH PowerShell module for SFTP.

    Code Block
    languagepowershell
    Install-Module -Name Posh-SSH
  5. When prompted, Press Y to install the Posh SSH PowerShell module.

  6. Add config values to config.json file.

  7. Execute the command below to run the script.

    Code Block
    languagepowershell
    ./JCscript.ps1

The script will create an accounts.csv file in the current directory and will upload it to the SFTP server if isSftpEnabled option is set to true in the config file.

...

Info

Note: Private key for SFTP authentication should be in RSA format not in OpenSSH format. You can convert the format with this command:

ssh-keygen -m pem -f /path/to/key

Sync accounts.csv file in Zilla

  1. Log into Zilla with your admin account and click Add Application in the upper right of the page.

  2. Image Modified

    Click the Custom Applications tab, fill in the necessary information and click Add to Applications.

    Image Modified
  3. Click Sync now in the top right of the page and in the dialog click the slider below Accounts & Permissions CSV File Upload to enable csv import. Click Next.

    Image Modified
  4. Upload the accounts.csv file from local.

    Image Modified

     

  5. Open Advanced options and check the box To map your active account status from your CSV, specify what value(s) indicate an ACTIVE account. All other rows will be marked as INACTIVE. In the text box, enter False.

    Image Modified

     

  6. Select Universal Id column as _id , Display Name column as username, Title column as jobTitle, Account Status column as suspended from the dropdowns. Click Next.

    Image Modified

  7. Review the information and click Import.

    Image Modified

When you have finished with all the steps above, review the information imported into Zilla.

...