Collecting Unlock App Usage using a Jamf Pro Extension Attribute
You can create a computer extension attribute in Jamf Pro to monitor which computers have users that are using the Jamf Unlock app for authentication.
This extension attribute uses the UnlockInUse
key from the com.jamf.connect.state
preference domain to populate inventory information in Jamf Pro.
In Jamf Pro, navigate to
and create a new computer extension attribute that uses the following script:#!/bin/sh
#Get current signed in user
currentUser=$(ls -l /dev/console | awk '/ / { print $3 }')
#com.jamf.connect.state.plist location
jamfConnectStateLocation=/Users/$currentUser/Library/Preferences/com.jamf.connect.state.plist
UnlockInUse=$(/usr/libexec/PlistBuddy -c "Print :UnlockInUse" $jamfConnectStateLocation || echo "Does not exist")
echo "UnlockInUse"
echo "<result>$UnlockInUse</result>"