Posted on 9th June 2017 by Darren Wallace

MDM Configuration Profile variable Reference

Please Note: This page has been updated, expanded and replaced with this one.

Hi All, this blog is different from the last few. It was raised by a customer…but on a JumpStart!

Ok not so different, but I had a request for a list of variables that can be added to a configuration profile that would be substituted by the MDM when the profile is deployed. This list is similar for a Casper / Jamf Pro solution but is not identical to the Apple Profile Manager variables. For ease of reference, I’ve detailed both below (current as of macOS 10.12.3 and Casper v9.97.1482356336) in the same blog.

Apple Profile Manager: User Variables

(Source: Payload variables)

Variable Substitution
%full_name% The user’s full name, for example, Melisa Dunbar
%first_name% The user’s first name, for example, Melisa
%last_name% The user’s last name, for example, Dunbar
%email% The user’s email address
%job_title% The user’s job title
%mobile_phone% The user’s mobile telephone number
%short_name% The user’s short name, for example, mdunbar
%guid% The user’s guid, for example, 501

Apple Profile Manager: Device Variables

(Source: Payload variables)

Variable Substitution
%ICCID% The ICCID from the device’s SIM card, if present
%OSVersion% The common version number of the device’s OS, such as “10.7”
%SerialNumber% The device’s serial number
%ProductName% The device’s product name, such as “MacBook”
%BuildVersion% An alphanumeric representation of the OS version installed on the device, such as “11J66”
%IMEI% The device’s International Mobile Equipment Identity, if present
%WIFIMAC% The MAC address of the device’s WiFi interface

Apple Profile Manager: Network Variables

(Source: Network Settings)

Variable Substitution
%AD_ComputerID% Active Directory computer ID
%AD_Domain% Active Directory domain
%AD_DomainForestName% Active Directory forest name
%AD_DomainGuid% Active Directory GUID
%AD_DomainNameDns% Active Directory DNS Name
%AD_KerberosID% Active Directory Kerberos ID
%ComputerName% The computer’s name, as set in System Preferences > Sharing
%HardwareUUID% The computer’s unique identifier
%HostName% The computer’s DNS name, such as mac1.example.com
%LocalHostName% The computer’s local network name, such as Mac1.local
%MACAddress% The computer’s Ethernet (en0) MAC address
%SerialNumber% The computer’s serial number

Casper / Jamf Pro: iOS Variables

(Source: iOS Configuration Profiles)

Variable Substitution
$DEVICENAME Mobile Device Name
$ASSET_TAG Asset Tag
$SITENAME Site Name
$SITEID Site ID
$SERIALNUMBER Serial Number
$UDID UDID
$USERNAME Username
$FULLNAME or $REALNAME Full Name
$EMAIL Email Address
$PHONE Phone Number
$ROOM Room
$POSITION Position
$DEPARTMENTNAME Department Name
$DEPARTMENTID Department ID
$BUILDINGNAME Building Name
$BUILDINGID Building ID
$MACADDRESS MAC Address
$JSSID JSS ID
$PROFILEJSSID JSS ID of the Configuration Profile

Casper / Jamf Pro: macOS Variables

(Source: macOS Configuration Profiles)

Variable Substitution
$COMPUTERNAME
or
$DEVICENAME
Mobile Device Name
$SITENAME Site Name
$SITEID Site ID
$SERIALNUMBER Serial Number
$UDID UDID
$USERNAME Username associated with the computer in the JSS
(computer-level profiles only)
Username of the user logging in to the computer
(user-level profiles only)
$FULLNAME or $REALNAME Full Name
$EMAIL Email Address
$PHONE Phone Number
$ROOM Room
$POSITION Position
$DEPARTMENTNAME Department Name
$DEPARTMENTID Department ID
$BUILDINGNAME Building Name
$BUILDINGID Building ID
$MACADDRESS MAC Address
$JSSID JSS ID
$PROFILEJSSID JSS ID of the Configuration Profile
$EXTENSIONATTRIBUTE_<#> Value for any LDAP Attribute

Use Case

So, what use cases for this wall of information? Well in some education labs, I’ve used the `%ComputerName%` or `$COMPUTERNAME` variable in a Login Window banner profile to show the device name on the login screen always.

MDM configuration profiles

Summary

As always, if you have any questions, queries or comments, let us know below (or @daz_wallace on Mac Admins Slack) and I’ll try to respond to and delve into as many as I can.

The usual Disclaimer:

While the author has taken care to provide our readers with accurate information, please use your discretion before acting upon information based on the blog post. Amsys will not compensate you in any way whatsoever if you ever happen to suffer a loss/inconvenience/damage because of/while making use of information in this blog.