Iru (Kandji) to JSM Assets

Iru (Kandji) to JSM Assets

Import Iru (Kandji) data into JSM Assets

Overview

Use OnLink to import devices, applications, users, and related attributes from Iru (Kandji) into JSM Assets. This guide explains how to configure the Iru (Kandji) connection, set up the Assets import, define mappings, test the import, and schedule production runs.

Prerequisites

Before you begin, make sure you have:

  • Access to OnLink from Manage your apps.

  • A Iru (Kandji) API URL and API key.

  • A Iru (Kandji) API token with the required device permissions.

  • Access to configure JSM Assets import settings.

Set up the Kandji connection

  1. Open OnLink from Manage your apps.

  2. Go to Connections.

  3. Select Add System.

  4. Choose IdM/Device Assets Sources.

  5. Enter the Iru (Kandji) API URL and API key.

  6. Save the connection.

For Iru (Kandji) API details, see Kandji API Overview.

Required Kandji API permissions

To import Kandji devices into Assets, configure the Kandji API token with at least Device list permissions. The token must include the access required for the import task. To gather information about all devices, use the following permissions:

Permission

Description

Devices: Device Information: Device list

Get a list of all devices in the Kandji tenant

Devices: Device Information: Device details

Get the full details for a specific device

Configure the Assets import

  1. After the connection is established, review the Assets import setup instructions.

  2. Open OnLink from Manage your apps.

  3. Configure the Assets import settings.

  4. Define the field-level mappings for your Assets object type.

Example device mapping

Use the following sample mapping configuration as a starting point:

key:device_id=id map:user.email=userId map:device_name=deviceName map:model=deviceModel map:platform=operatingSystem

Mapping reference

The table below explains common mapping and configuration entries. Use any other field returned by the Kandji API if it is required for your Assets object type.

Entry

Purpose

Example / notes

Entry

Purpose

Example / notes

key:device_id=id

Uses device_id as the unique identifier so OnLink can update existing records.

id is a text attribute in Assets.

map:user.email=userId

Maps the Kandji user email to the userId text attribute.

Use this when the Assets attribute stores the email as text.

map:serial_number=Serial Number

Maps the Kandji device serial number to an Assets text attribute for serial.

Use an Assets text attribute; common attribute name Serial Number.

map:model=deviceModel

Maps the Kandji device model to an Assets text attribute for model.

Use an Assets text attribute; common attribute name Model.

map:os_version=OS Version

Maps Kandji OS version to an Assets attribute.

Use a text attribute (e.g., OS Version); values like 14.6.

map:user.email=Atlassian User ID

Maps the Kandji user email to an Assets attribute of type User.

OnLink looks up the Atlassian user object by email.

config:filterKey=platform
config:filterValue=Mac

Filters imported devices by platform.

Supported filter values include Mac, iPad, iPhone, and AppleTV.

config:section=all_apps

Pulls all apps from Kandji into an app-specific Assets object type.

Use bundle_id as the key because it is unique for each app.

config:section=per_device_apps

Pulls the apps installed on each device.

Use with the all_apps configuration to map one or more apps to a device.

config:data_source=ade/devices

Pulls ADE devices from Kandji.

Additional fields from the Kandji ADE devices API can be included in the mapping.

Filters and sections

All apps

Use this configuration to pull all apps from Kandji into an app-specific Assets object type:

key:bundle_id=AppID map:app_name=App Name map:source=App Source config:section=all_apps

Per-device apps

Use this configuration to pull the apps installed on each device. This works with the all-apps configuration to map one or more apps to a device:

key:device_id=Device ID map:device_name=Device Name map:model=Model map:appBundleIds=Apps|AppID=${appBundleIds} config:section=per_device_apps

ADE devices

Use the following data source to pull ADE devices:

config:data_source=ade/devices

Example mappings are shown below. You can include other fields from the Kandji ADE devices API if needed:

key:id=<assets attribute> map:device_family=<assets attribute> map:user_id=<assets attribute> map:model=<assets attribute> map:os=<assets attribute> map:serial_number=<assets attribute> map:mdm_device.enrollment_status=<assets attribute>

 

Add Assets Data Source (Additional Option)

Use Add Assets Data Source when you need to connect directly to the Iru (Kandji) API and call a specific API method for an Assets import. This option is useful when the standard Kandji connection does not cover the endpoint or data shape you need.

Configure the connection

  1. Open the Assets import configuration where you want to add the source.

  2. Select Add Assets Data Source.

  3. Enter the Kandji API base URL for your tenant.

  4. Set Authorization to Bearer Token.

  5. Paste the Kandji API token that has the required permissions for the endpoint you plan to call.

Security note: Treat the bearer token as a secret. Do not paste the token into mappings, logs, screenshots, or documentation.

Define the API request

  1. Set the HTTP method to GET.

  2. Enter the Kandji API endpoint you want to query. For example, use the devices endpoint to return device records.

  3. Include a limit query parameter to control the number of records returned per request.

https://{sub_domain}.api.kandji.io/api/v1/devices?limit=300

Replace {sub_domain} with your Kandji tenant subdomain. You can point the data source to any Kandji API method that returns the data required for your Assets object type.

Configure pagination

Set the pagination strategy to Offset/Limit. This allows OnLink to request records in batches until all matching Kandji records have been retrieved.

Pagination setting

Value

Purpose

Pagination setting

Value

Purpose

Strategy

Offset/Limit

Requests the next batch of records by increasing the offset.

Limit

300

Controls how many records are returned per request. Match this to the limit value in the API URL.

Offset

Default offset field

Tracks the starting position for the next request.

Test the data source

  1. Select Continue to test.

  2. Select Run test.

  3. Review the sample records returned from Kandji.

  4. Confirm that the response includes the fields needed for your Assets mapping.

  5. Save the data source when the test output looks correct.

After the data source is saved, use it in the Assets configuration and complete the field mapping for the target object type.

Testing and scheduling

OnLink processes data in two steps: Get Data and Import Data.

  1. Click Get Data.

  2. Wait until the Job Logs show: No more pending records. Data will be imported on next Import run.

  3. Click Import.

  4. For production, configure the schedule you want to use. Production runs are fully automated based on that schedule.

Troubleshooting and notes

  • Any field returned by the Kandji API can be used in the mapping.

  • For a full list of available device fields, see the Kandji List Devices API.

  • Confirm that the Kandji API token has the required permissions before testing the import.

image-20240318-045922.png