#!/bin/bash
#Determine PSSO status of current console user logged in at time of recon
#Get current user logged in to device
currentUser=$( /usr/sbin/scutil <<< "show State:/Users/ConsoleUser" | /usr/bin/awk -F': ' '/[[:space:]]+Name[[:space:]]:/ { if ( $2 != "loginwindow" ) { print $2 }}' )
#Read local user directory record to see if AltSecurityIdentities attribute has been added by macOS
pssoe_status=$(dscl . read /Users/$currentUser dsAttrTypeStandard:AltSecurityIdentities | awk -F'SSO:' '/PlatformSSO/ {print $2}')
if [[ -z $pssoe_status ]]; then
echo "<result>No PSSOe registration found</result>"
else
echo "<result>Yes Entra ID account $pssoe_status registered to $currentUser</result>"
fi
Question
Extension Attribute to determine user PSSO status
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
