Extract alias address from 'ToRecipients' field of GraphAPI response

Yujia Zhai 1 Reputation point
2021-10-20T19:33:44.233+00:00

Hello, the Engineering team

We are facing some issues extracting alias info from email items, which are pulled from a shared mailbox via GraphAPI. Our setup type is hybrid, hence we are routed here by MS Graph API support team.

Below I attached the API EmailItem response and InternetHeaders we got from Graph API:

await graphClient.Users[userName].Messages[immutableId].Request(headerOptions).GetAsync();

https://jsonblob.com/900097186965241856 (EmailItem)
https://jsonblob.com/900466012949069824 (InternetHeader)

The address field under the 'ToRecipients' array is the primary email address(devtest@xxxxxx .net) even we can tell the alias address (devtest1@xxxxxx .net) from the header.

It was working around a month ago when we could see the alias address displaying under the 'ToRecipients' field. However, it just doesn't work as expected recently. We feel it is not stable enough for us to rely on. Could you help us figure out the root cause and give us any suggestions if possible?

Please feel free to let us know if we need to provide more details and looking forward to hearing from you!
Enterprise User

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,716 questions
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,210 questions
Exchange Server Development
Exchange Server Development
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Development: The process of researching, productizing, and refining new or existing technologies.
516 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,369 questions
Microsoft Exchange Hybrid Management
Microsoft Exchange Hybrid Management
Microsoft Exchange: Microsoft messaging and collaboration software.Hybrid Management: Organizing, handling, directing or controlling hybrid deployments.
1,901 questions
{count} votes