Managing macOS Custom Attributes
Custom attributes enable administrators to extract particular values from a managed device and return it to the Workspace ONE UEM Console. This can be particularly useful for device configuration auditing and Product sequencing.
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 through the Workspace ONE Intelligent Hub. The scripts/commands are delivered to the device using 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.
For more Custom Attributes, refer to the samples repository on GitHub for numerous community-provided Custom Attribute scripts: https://github.com/vmware-samples/AirWatch-samples/tree/master/macOS-Samples/CustomAttributes
1. Create Custom Attribute Profile
Return to the workstation where you are taking the Hands-on Lab. In the Workspace ONE UEM console:
- Click Devices
- Expand Profiles & Resources
- Click Profiles
- Click Add
- Click Add Profile
2. Select Profile Platform
3. Select the Profile Context
Click Device Profile.
4. Configure General Profile Settings
- Select General if it is not already selected.
macOS Device Custom Attributesin the Name text box.
- Ensure the Assignment Type is set to Auto.
- Click in the Smart Groups field. This will pop-up the list of created Smart Groups. Enter
All Devicesand select the All Devices ([email protected]) Smart Group.
Note: You DO NOT need to click Save or Save & Publish at this point. This interface allows you to move around to different payload configuration screens before saving.
5. Configure Custom Attributes Payload
Customin the Profile search bar.
- Select Custom Attributes.
- Click Configure.
6. Enter Local Host Name Custom Attribute Command
LocalHostNameas the Attribute Name
- Enter the following command:
/usr/sbin/scutil --get LocalHostNameBe sure to use the correct slash, two hyphens, and proper capitalization.
NOTE: Remember that you can select text in the manual and drag-and-drop the text into the workstation console to copy and paste!
- Select Schedule for the Execution Interval.
- Select 1 Hour as the reporting interval.
- Click Save & Publish.
7. Publish the Device Profile
Click the Publish button.
After Workspace ONE UEM delivers a custom attributes profile/payload to a device, the Intelligent Hub will report the initial value of the Custom Attribute back to Workspace ONE UEM 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.
8. Access the Enrolled macOS Device
- Select Devices.
- Select List View.
- Click the macOS device you have enrolled.
9. Access Custom Attributes
- Select More.
- Select Custom Attributes.
10. Review Custom Attributes
- Notice that the Source of the attributes is Device Sourced—this means the data was gathered from the device and sent to Workspace ONE UEM.
- 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.