Skip to main content
Question

View last time sync ran and the results

  • December 3, 2023
  • 2 replies
  • 31 views

Ahadub
Forum|alt.badge.img+5

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?  

2 replies

DBrowning
Forum|alt.badge.img+24
  • Esteemed Contributor
  • December 3, 2023

if you run defaults read com.jamf.connect.state it will show you last login and password status.


AJPinto
Forum|alt.badge.img+26
  • Legendary Contributor
  • December 4, 2023

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