Computer Extension Attributes

Computer extension attributes are custom fields that you can create to collect almost any type of data from a computer. For example, you can create an extension attribute to collect the host name of a computer or collect data about the activity of the company’s antivirus software.

There are several ways to create a computer extension attribute in Jamf Pro. You can manually create the extension attribute, use an extension attribute template available in Jamf Pro, or upload an extension attribute template obtained from Jamf Nation.

When you create a computer extension attribute, you specify the following information:

  • Type of data being collected, such as string, integer, or date

  • Inventory category in which to display the extension attribute in Jamf Pro, such as Hardware or Operating System

  • Input type, which determines how the extension attribute is populated with data

  • Pane on which to display the extension attribute in Recon (text field and pop-up menu input types only)

  • Script to use to collect data from computers (script input type only)

Extension attributes can add time and network traffic to the inventory process depending on the type of data you choose to collect and the input type used to collect it.

Computer Extension Attribute Input Types

You can choose to populate the value of a computer extension attribute using any of the following input types:

  • Text field—This displays a text field in Recon and in computer inventory information. You can enter a value in the field when enrolling a computer using Recon, or at any time using Jamf Pro. Only extension attributes created manually can be populated using a text field.

  • Pop-up menu—This displays a pop-up menu in Recon and in computer inventory information. You can choose a value from the pop-up menu when enrolling a computer using Recon, or at any time using Jamf Pro. Only extension attributes created manually can be populated using a pop-up menu.

  • Script—This allows you to run a script that populates the extension attribute each time a computer submits inventory to Jamf Pro. Extension attributes created manually can be populated by a script. Extension attributes created from a template are always populated by a script. You can disable extension attributes with the script input type.

  • LDAP Attribute Mapping—This populates the extension attribute with the value for an LDAP attribute. Creating the LDAP Attribute Mapping computer extension attribute also generates a variable that can be used to populate configuration profile settings with values for the LDAP attribute. The variable is $EXTENSIONATTRIBUTE_<#>, where <#> is the extension attribute ID. For more information on payload variables for configuration profiles, see Computer Configuration Profiles.

    Beginning with Jamf Pro 10.14.0, extension attributes can be mapped to multiple-value attributes from the LDAP server, such as "memberOf". When the inventory collection settings are configured to collect user and location information from LDAP, these values will be displayed in the inventory information for a computer. 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.
    Consider the following limitations when using LDAP multiple-value extension attributes:

    • 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 = &vert;).

Creating a computer extension attribute generates a variable that can be used to populate configuration profile settings. The variable is $EXTENSIONATTRIBUTE_<#>, where <#> is the extension attribute ID. For extension attributes with the "Text field" or "Pop-up menu" input type, the ID number is found in the extension attribute URL. In the example URL below, "id=2" indicates the extension attribute ID number:
https://instancename.jamfcloud.com/mobileDeviceExtensionAttributes.html?id=2&o=r

For more information on payload variables for configuration profiles, see Computer Configuration Profiles.

Computer Extension Attributes Populated by a Script

When an extension attribute is populated by a script, the text between the <result></result> tag is stored in Jamf Pro.

For Mac computers, scripts can be written in any language that has an interpreter installed. The most common interpreters are:

/bin/bash
/bin/sh/usr/bin/perl/usr/bin/python

All scripts must start with a shebang (#!) followed by the absolute path to the interpreter. For example, the script for an extension attribute that collects the host name from Mac computers looks like this:

#!/bin/sh
echo "<result>`hostname 2>&1`</result>"

For Windows computers, scripts can be written in VBScript, Batch file, and PowerShell.

Note: PowerShell scripts only run on computers that have the components necessary to run the script.

Requirements

To create a computer extension attribute with the “LDAP Attribute Mapping” input type, you need:

Manually Creating a Computer Extension Attribute

  1. Log in to Jamf Pro.

  2. In the top-right corner of the page, click Settings images/download/thumbnails/79175064/Icon_Settings_Hover.png .

  3. Click Computer Management.

  4. In the ”Computer Management–Management Framework” section, click Extension Attributes images/download/thumbnails/79175064/Extension_Attributes.png .

  5. Click New images/download/thumbnails/79175064/Icon_New_Button.png .

  6. Configure the settings on the pane.

  7. Click Save.

If the extension attribute has the “LDAP Attribute Mapping” input type, the LDAP attribute variable is displayed on the pane.

Creating a Computer Extension Attribute from a Template

Jamf Pro has built-in templates for many commonly used extension attributes.

  1. Log in to Jamf Pro.

  2. In the top-right corner of the page, click Settings images/download/thumbnails/79175064/Icon_Settings_Hover.png .

  3. Click Computer Management.

  4. In the ”Computer Management–Management Framework” section, click Extension Attributes images/download/thumbnails/79175064/Extension_Attributes.png .

  5. Click New From Template.

  6. Click the extension attribute template you want to use.

  7. Make changes to the settings as needed.

  8. Click Save.

Uploading a Template for a Computer Extension Attribute

You can create an extension attribute by uploading an extension attribute template obtained from Jamf Nation. Extension attribute templates are available in Jamf Nation at:
https://www.jamf.com/jamf-nation/third-party-products/files/extension-attributes

  1. Log in to Jamf Pro.

  2. In the top-right corner of the page, click Settings images/download/thumbnails/79175064/Icon_Settings_Hover.png .

  3. Click Computer Management.

  4. In the ”Computer Management–Management Framework” section, click Extension Attributes images/download/thumbnails/79175064/Extension_Attributes.png .

  5. Click Upload and upload the extension attribute template.

  6. Make changes to the settings as needed.

  7. Click Save.

Disabling a Computer Extension Attribute

To troubleshoot processes, you can temporarily disable extension attributes with the script input type. You can also choose whether to retain or delete data collected by that extension attribute.

  1. Log in to Jamf Pro.

  2. In the top-right corner of the page, click Settings images/download/thumbnails/79175064/Icon_Settings_Hover.png .

  3. Click Computer Management.

  4. In the "Computer Management–Management Framework" section, click Extension Attributes images/download/thumbnails/79175064/Extension_Attributes.png .

  5. Select the extension attribute you want to disable.

    Note: Only extension attributes with the script input type can be disabled.

  6. Click Edit.

  7. Deselect the Enabled (script input type only) checkbox.

  8. Click Save.

  9. Use the pop-up dialog to choose one of the following:

    • To retain data collected by the extension attribute, select Retain Existing Data, and then click Save.

      Note: All settings and computers that use data collected by this extension attribute will display or use the last value collected by the extension attribute before it was disabled.

    • To delete data collected by the extension attribute, select Delete Existing Data, and then click Save.

      Note: If items, such as smart computer groups, are using the extension attribute data, deleting existing data may prevent those items from functioning correctly.

Related Information

For related information, see the following sections in this guide:

Copyright     Privacy Policy     Terms of Use     Security
© copyright 2002-2019 Jamf. All rights reserved.