Extension attributes collect inventory data by using an input type. You can configure the following input types:
- Text Fields
- You can display a text field in inventory information. You can enter a value in the field during enrollment anytime using Jamf Pro.Note:
Text fields can only be configured by a manually created extension attribute or programmatically via the Jamf Pro API.
- Pop-up Menus
- You can display a pop-up menu in inventory information. You can choose a value from the pop-up menu when enrolling a computer any time using Jamf Pro.Note:
Pop-up menus can only be configured by a manually created extension attribute or programmatically via the Jam Pro API.
- Scripts
You can run a script that returns a data value each time a computer submits inventory to Jamf Pro. You can write your own extension attribute script or create one from a template in Jamf Pro.
Keep the following in mind when writing extension attribute scripts:Scripts can be written in any language that has an interpreter installed. The most common interpreters are Bash, Perl, and Python.
When an extension attribute is populated by a script, the text between the
<result></result>tag is stored in Jamf Pro. If no<result></result>tag is specified in the script, a blank value will be sent to Jamf Pro.You can temporarily disable extension attributes to troubleshoot processes.
The following example script collects the hostname from Mac computers:#!/bin/bash echo "<result>$(/bin/hostname 2>&1)</result>"- Directory Service Attribute Mapping
You can use a Directory Service attribute mapping to populate an extension attribute. Extension attributes can be populated by multiple-value attributes from an LDAP server, such as "memberOf". The multiple values can later be used when creating smart groups and advanced searches with the extension attribute criteria and the "has" or "does not have" operators.
Keep the following limitations in mind when using Directory Service multiple-value extension attributes:When creating smart groups and advanced searches, the criteria value must accurately reflect the value returned in inventory. To ensure you use the correct value, copy the extension attribute inventory value, and paste it in the criteria value field.
Multiple-value attribute mapping will not work with nested groups. Only the groups directly listed on the User record will be displayed in the mapped LDAP extension attribute.
For the extension attributes to work correctly, values returned from the LDAP server cannot contain the sequence of repeating vertical-bar characters (ASCII code 124, HTML entity = |).