I’ve found that it can be useful to have the Jamf Connect login window appear initially during device setup, then I’d prefer it to switch to the local window. Yes, there is the local login button, but it’s nice to have the Mac return to “normal” macOS functionality after the initial setup.
Here’s a Script I used to make this happen:
#!/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
#check if user logged in is a jamf connect user
if [[ $(/usr/bin/defaults read $jamfConnectStateLocation DisplayName 2>&1) == *"does not exist"* ]]; then
#no, set to entra ID
authchanger -Reset -JamfConnect
else
#yes, set to local
authchanger -Reset
fi
exit 0
The added benefit of this script is that if used in a “on login” policy in Jamf Pro, you can quickly and easily re-provision devices.