Get the original sender of forwarded email – Microsoft Graph API

Maria Helena Norén 1 Reputation point
2022-02-25T10:09:07.477+00:00

I am using the Microsoft Graph API to get emails from a user. But when an email has been forwarded I want to see who the original sender was - who the email was forwarded from, not who forwarded the email. Is there any easy way to do this? I can see it in the HTML body of the email, but I would prefer not to have to parse the body and filter out the information from there.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,798 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Glen Scales 4,431 Reputation points
    2022-02-27T23:11:23.497+00:00

    Its not directly tracked in any properties on the Message itself (other then the body text). You can get the original InternetMessageId from either the In-Reply-To: or References: property which is part of the internetMessageHeaders collection (or you can get them using an extended property). So if the forwarding mailbox is accessible you can query that mailbox based on the InternetMessageId you extracted from the forwarded message to work out the original sender. That method won't work if the forwarder is external though.

    0 comments No comments