Microsoft Azure AD graph API: How do I retrieve a user's email address?
The mail
property is set in one of 2 ways:
- It's been set on on-premises AD, and then synchronized to Azure AD using AD Connect
- The cloud user has been assigned an Office 365 license (and a mailbox), at which point the
mail
property is set for this licensed user.
If the user does not have an O365 mailbox/license, you could also search for the user by userPrincipalName, displayName, etc. $filter supports the OR operator.
Hope this helps,