Generally speaking, if you are interested in such data, best use the Exchange Online PowerShell cmdlets. Azure AD is not the authoritative source for proxyaddresses/mail and anything related to Exchange objects/attributes, and it's not uncommon for sync issues between Azure AD and the underlying ExODS to occur. Granted, you probably want to avoid using PowerShell, but until Microsoft releases endpoints for Exchange admin tasks, that's your best option. If you are fine with "unsupported" methods, you can query the REST endpoints behind the new PowerShell cmdlets directly, see here: https://www.michev.info/Blog/Post/2869/abusing-the-rest-api-endpoints-behind-the-new-exo-cmdlets
Email aliases not coming back from graph API users endpoint
We are seeing a few users for which the graph API returns only a primary email despite knowing that there are multiple SMTP addresses configured for these users. We are observing this on the List Users endpoint as well as the Get User endpoint.
When using the $select
parameter to include the otherMails
and proxyAddresses
properties, both come back as empty arrays. Microsoft365 admins for the tenant to which these users belong have provided us with screenshots demonstrating that some of these users have at least one email alias configured in addition to their primary email.
I'm curious if there's any scenario in which it would be expected that otherMails
and proxyAddresses
would be empty despite the presence of aliases on a user? Or if there's a particular way in which the request to the List/Get users endpoints must be crafted to get these fields to come back non-empty. According to the docs it seems like a collision between SMTP addresses across directory objects might cause this, but I'm certain that's not the case for all of the users for which we're seeing this issue.