Global Variables

By Corey Willis

Learn which variables are available and where to use them

What are Global Variables?

Global variables (or environment variables) are dynamic values that influence how processes and applications behave. These variables store essential information like system paths, user details, and configuration settings, which can be accessed and utilized by various programs and scripts. Kandji's Global Variables feature allows you to automatically input unique device details into most profile text fields within profiles—including Custom Profiles and other Library Items—or App Config

How to use Global Variables in Kandji

Global Variables can be used inside most text fields within Profiles (Custom Profiles or Library Items) and the Provision Local Administrator Account section's Full Name and Short Name fields in the Automated Device Enrollment Library item. Global Variables work for all device types. Variables can also be used multiple times in the same field.

If a device variable that is used on a profile is updated, that profile will be re-installed on the device with the updated variable. For use in custom scripts, we have examples of a Custom Profile that populates those values locally, and a Custom Script which reads those values back into the web app on our GitHub repo.

Available Global Variables

All Device Families

VariableDescription
$SERIAL_NUMBERInserts the Serial Number of the device the profile installs on.
$DEVICE_NAMEInserts the Device Name of the device the profile installs on.
$ASSET_TAGInserts the Asset Tag of the device the profile installs on.
$DEVICE_IDInserts the Device ID of the device the profile installs on.
$UDIDInserts the Unique Device Identifier of the device the profile installs on.
$PROFILE_UUIDInserts the Universally Unique Identifier of the profile.
$EMAILInserts the Email Address of the Assigned User for the device. 
$FULL_NAMEInserts the Full Name of the Assigned User for the device.
$EMAIL_PREFIXInserts the Email Prefix of the Assigned User for the device. (Everything before the @ symbol) 
$DEPARTMENTInserts the Department of the Assigned User for the device.
$JOB_TITLEInserts the Job Title of the user that is defined in the identity provider.
$BLUEPRINT_IDInserts the Blueprint ID of the Blueprint the device is assigned to.
$BLUEPRINT_NAMEInserts the Blueprint Name of the Blueprint the device is assigned to.
$MODEL_NAMEInserts the Model Name of the device the profile installs on.
$MODEL_IDENTIFIERInserts the Model Identifier of the device the profile installs on.

iPhone and Cellular iPad Only

VariableDescription
$MEIDInserts the MEID of the device the profile installs on.
$ICCID_SLOT_1Inserts the ICCID for SIM slot 1 of the device the profile installs on.
$ICCID_SLOT_2Inserts the ICCID for SIM slot 2 of the device the profile installs on.
$IMEI_SLOT_1Inserts the IMEI for SIM slot 1 of the device the profile installs on.
$IMEI_SLOT_2Inserts the IMEI for SIM slot 2 of the device the profile installs on.
$PHONE_NUMBER_SLOT_1Inserts the Phone Number for SIM slot 1 of the profile.
$PHONE_NUMBER_SLOT_2Inserts the Phone Number for SIM slot 2 of the Assigned User for the device. 

iPhone, iPad, and Apple TV Only

VariableDescription
$MODEL_NUMBERInserts the Model Number of the device the profile installs on.