Posted on 08-30-2018 10:32 AM
Is there any way that we in Jamf Pro can display which appleID the user has chosen?
Posted on 08-30-2018 10:37 AM
#!/bin/bash
for user in $(ls /Users/ | grep -v Shared); do
if [ -d "/Users/$user/Library/Application Support/iCloud/Accounts" ]; then
Accts=$(find "/Users/$user/Library/Application Support/iCloud/Accounts" | grep '@' | awk -F'/' '{print $NF}')
iCloudAccts+=(${user}: ${Accts})
fi
done
echo "<result>$(printf '%s
' "${iCloudAccts[@]}")</result>"