Skip to main content
Question

iCloud App logins - EA?

  • November 2, 2023
  • 0 replies
  • 4 views

jhathcock
Forum|alt.badge.img+7

So I have an EA set to list who's logged into iCloud in Settings courtesy of @YanW  (thank you!). 

#!/bin/sh
## Get logged in user
loggedInUser=$(stat -f%Su /dev/console)
icloudaccount=$( defaults read /Users/$loggedInUser/Library/Preferences/MobileMeAccounts.plist Accounts | grep AccountID | cut -d '"' -f 2)
if [ -z "$icloudaccount" ] 
then
    echo "<result>No Accounts Signed In</result>"
else
    echo "<result>$icloudaccount</result>"
fi

Does anyone have scripts for seeing who's logged into Messages, Photos, Music, etc?  We have some of it banned via profiles, but would like to catalog who snuck in.