My main goal is to get the alias of an MS365 Group that an email was sent to, since in the toRecipients address, it resolves to the primary SMTP address. I have determined that the possible route I have to go to get this is through the email headers. This information appears in outlook when I click on "view message details" button in the email actions toolbar.
I've looked at the following questions:
Microsoft Graph : How get alias email from message
Find the email aliases a message was actually sent to
Microsoft Graph: How to get the alias from an email message?
Can you get PR_TRANSPORT_MESSAGE_HEADERS 0x007D from the .Net Microsoft Graph API?
However, when I try something like
https://graph.microsoft.com/v1.0/groups/{group-id}/threads/{thread-id}?$select=internetMessageHeaders&$expand=singleValueExtendedProperties($filter=id eq 'String 0x007D')
or
https://graph.microsoft.com/v1.0/groups/{group-id}/threads/{thread-id}?$expand=singleValueExtendedProperties($filter=id eq 'String 0x007D')
I get this error
Parsing OData Select and Expand failed: Could not find a property named 'singleValueExtendedProperties' on type 'microsoft.graph.conversationThread'