Posted on 12-03-2023 08:58 AM
Is there a script or EA we can use to see when the last time Jamf Connect checked the sync status of the password and what the results were?
Posted on 12-03-2023 09:17 AM
if you run defaults read com.jamf.connect.state it will show you last login and password status.
Posted on 12-04-2023 05:43 AM
JAMF Connect writes everything it does to a plist in the user's profile. This is the EA I use to read information from that plist.
#!/bin/zsh
#*=============================================================================
#* Script Name: User_AD_Password_Expire_JAMF_Connect
#* Created:
#* Author:
#* Comment: Change PasswordExpirationRemainingDays to whatever you are wanting to read.
#*=============================================================================
ActiveUser=`/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }' | tr "[a-z]" "[A-Z]"`
if [ -f "/Users/$ActiveUser/Library/Preferences/com.jamf.connect.state.plist" ]; then
Password_Expiry=$( /usr/bin/defaults read "/Users/$ActiveUser/Library/Preferences/com.jamf.connect.state.plist" PasswordExpirationRemainingDays )
echo "<result>$Password_Expiry</result>"
else
echo "<result>Has not signed in to JAMF Connect</result>"
fi
exit 0