Extract alias address from 'ToRecipients' field of GraphAPI response
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