Intro to Custom Attributes
Custom attributes enable administrators to extract particular values from a managed device and return it to the AirWatch Admin Console. This can be particularly useful for device configuration auditing and Product sequencing.
1. Custom Attributes
Custom Attributes are key-value pairs. These key value pairs are generated by scripting/commands which execute on the device and whose values are returned to the console via the AirWatch Agent. The scripts/commands are delivered to the device via a Custom Attributes payload in a profile. The profile also allows scheduling of the script/command to re-occur on a schedule or based on an event. Additionally, Custom Attribute payloads execute in the root context on the device, which allows you to gather information about the device without requiring the enrolled user to have Administrative permissions.
2. Custom Attribute Profiles
Previously, Custom Attributes were sent to the console by creating a shell script to write values to a specific Plist file monitored by the AirWatch Agent. With AirWatch 8.2 and above, this functionality is now included as a profile and adds additional features such as scheduling.
2.1. Create Custom Attribute Profile
- Click Devices
- Expand Profiles & Resources
- Click Profiles
- Click Add
- Click Add Profile
2.2. Select a Platform
2.3. Select Profile Context
Click Device Profile.
2.4. Configure General Profile Settings
- Click on General if it is not already selected.
- Give the profile a name such as macOS Device Custom Attributes by entering the string in the Name field.
- Copy the profile name in the the Description field.
- Ensure the Assignment Type is set to Auto
Click in the Assigned Groups field. This will pop-up the list of created Assignment Groups. Start Typing All Devices and select the All Devices ([email protected]) Smart Group.
NOTE - You may need to scroll down to find the Assigned Groups field.
NOTE - You do not need to click SAVE or SAVE AND PUBLISH at this point. This interface allows you to move around to different payload configuration screens before saving.
2.5. Configure Custom Attributes Payload
- Scroll down the list of Payload Types on the left side
- Click Custom Attributes
- Click Configure
2.6. Enter Local Host Name Custom Attribute Command
- Enter LocalHostName as the Attribute Name
- Enter the command shown below. Be sure to use the correct slash, two hyphens, and proper capitalization.
- Select 1 Hour as the Reporting
- Click Save & Publish.
NOTE - Please refer the Lab Guidance section in the beginning for how to copy text from manual to use in VLP.
Custom Attribute Command:
/usr/sbin/scutil --get LocalHostName
3. Locating Custom Attributes
Once AirWatch delivers a Custom Attributes profile/payload to a device, the Agent will report the initial value of the Custom Attribute back to AirWatch and begin the Schedule or Event monitoring. Custom Attribute values that have been reported back to the console can be viewed in the device details.
3.1. Access Device List View
- Click on Devices
- Click on List View
3.2. Select Your Device
Click on your device
3.3. Access Custom Attributes
- Click on More.
- Click on Custom Attributes.
3.4. Review Custom Attributes
- Notice that the Source of the Attributes is Device Sourced, meaning it was gathered at the device and sent to AirWatch.
- Note the list of Attributes.
- Note the value of each Attribute. These values were generated by the output of your command/script in the Custom Attributes payload.