Check if You're Signed In with an Apple ID on macOS

โœ… Method 1: Use System Settings

macOS Monterey or earlier: Use System Preferences โ†’ Apple ID.

๐Ÿงช Method 2: Use Terminal Commands

Option 1: Check MobileMe Account Info

defaults read MobileMeAccounts

Option 2: Check Authentication Authority

dscl . -read /Users/$(whoami) AuthenticationAuthority | grep -i icloud

Option 3: Use System Profiler

system_profiler SPAppleIDDataType

Example output when signed in:

Apple ID:
    Name: John Doe
    Email: john.doe@icloud.com

If not signed in:

No Apple account is currently signed in.

๐Ÿ›  Bonus: Simple Script

#!/bin/bash
if system_profiler SPAppleIDDataType | grep -q "No Apple account"; then
    echo "Not signed in with Apple ID."
else
    echo "Apple ID is active:"
    system_profiler SPAppleIDDataType | grep -E "Name|Email"
fi