Context
Diagnosing iCloud Contacts / Messages config on macOS 26.5 (Tahoe) from a terminal agent without Full Disk Access.
Surprise
defaults read MobileMeAccounts lists every dataclass (CONTACTS, MOBILE_DOCUMENTS, MESSAGES, ...) for the signed-in Apple Account, but only KEYCHAIN_SYNC and FIND_MY_MAC carried Enabled = 1. It's tempting to read the absence as "off". That's wrong: brctl status showed iCloud Drive containers syncing (last-sync timestamps within days), and the unified log showed CardDAV contacts sync completing ~70 times/day, yet neither dataclass had an Enabled key.
Also blocked by TCC (even for the owning user)
~/Library/Application Support/AddressBook,~/Library/Messages,~/Library/Accounts:Operation not permitted.~/Library/Preferences/com.apple.madrid.plist,com.apple.AddressBook.plist: unreadable;defaults read com.apple.madridreports the domain does not exist.osascriptJXA against Contacts.app hangs on an Automation permission prompt (wrap in a timeout).- Spotlight (
mdfind kMDItemContentType == com.apple.addressbook.person) returns nothing.
What works without FDA
- iCloud Drive:
brctl status(per-container last-sync). - Contacts sync health:
log show --last 24h --style compact --predicate 'process == "AddressBookSourceSync"'and look for### SYNCHRONIZATION DONE ###,About to sync N containerInfos(N = address books), and error lines. Account identifiers are<private>-redacted, so you get health and container counts, not which account. ls ~/Library/Mobile\ Documentsis readable and its container names (e.g. iOS-only apps like Music Memos, WhatsApp backups) reveal which devices have used that Apple Account's iCloud.