Retrieving Entra ID email address from macOS devices in system context
Dear Team,
We are working on retrieving email address of the user joined to Entra ID from Entra-joined macOS devices, specifically while running in a system context. The sudo dscl . -read /Users/$(whoami) RecordName command give the local user name whose password is synced with the entra ID. We would greatly appreciate guidance on how to retrieve the Entra ID joined user’s email address in a system context from Entra Joined mac devices, especially from those with prior experience in this area.
Thank you for your support.
[Re-Titled by Moderator]
Original Title: Fetch Entra ID Email
MacBook Pro 14″, macOS 15.6