how accurate is the email address attribute from get-aduser

crib bar 531 Reputation points
2024-04-03T13:20:29.7033333+00:00

If you use Exchange Online (ExO) for your organisations email system (and perhaps previously used on-prem Exchange Server), how accurate & current is a user’s email attribute that would be produced if you ran a get-aduser PowerShell command on the on-prem AD that is synched with an organization’s Azure AD/365 tenancy? For example, is this automatically populated based on some sort of integration with ExO? Or is it simply a manual entry when the users AD account was created, and therefore could technically be incorrect?

I am guessing the majority of our user accounts were setup in a previous technology landscape where accounts were created in on-prem classic AD, and at the time the organisation was using on-prem Exchange Server. I was never sure if AD somehow consumed the email address attribute that is reported in get-aduser directly from Exchange, or if this was manually entered and is actually totally independent of the user’s actual email address set in Exchange?

We basically need to get a regular report (quarterly basis) or all AD accounts, current account status (enabled/disabled/account expiry date), and an accurate email address for each account, to ensure they all match to information recorded in a 3rd party database that sends automated email reminders. If we can use get-aduser that would cover all bases, but I wasnt 100% sure how accurate/automated the email address attribute is nowadays if the email system has moved to the cloud.

Microsoft Exchange Online
Exchange Server
Exchange Server
A family of Microsoft client/server messaging and collaboration software.
1,083 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
5,899 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,569 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Andy David - MVP 142.2K Reputation points MVP
    2024-04-03T13:36:37.7066667+00:00

    In theory it should match, however an email address can be added to an AD object that isnt mail-enabled on-prem and it wont show up correctly in Exchange Online.

    Personally, I would only use Exchange to verify which are accurately set as recipients and the types.

    You could also run checks against both and find any that dont match as a cleanup too.

    0 comments No comments