Expose intermetMessageId in Graph API for Teams Group

Expose intermetMessageId in Graph API for Teams Group
0

Upvotes

Upvote

 Jun 21 2023
1 Comments (1 New)
New

The scenario is a Teams Group has an email address, and is configured to not forward email to individual group members.  We need to be able to find via API the specific message received by the Team Group that corresponds with a known email message selected from a mailbox Sent Items.  The use case is a custom recall function in which a Sent Item is selected and deleted from recipients.  For the case where the message is sent to a Teams Group, we are not able to find the message by internetMessageId.
The properties returned via /groups/{{teamId}}/conversations and /groups/{{teamId}}/threads do not include most of the MIME properties.  Properties include lastDeliveredDateTime which may not exactly match the DateTimeSent of the email message.  Properties also include uniqueSenders, but values appear to return displayName rather than email address.
The request is to expose MIME properties or at least the internetMessageId value of a mail message when queried through the /groups/{{teamId}}/conversations or /groups/{{teamId}}/threads APIs. 

Comments
Iron Contributor

Hey there,

For internal messages, you need to work with conversations, as they are not treated as SMTP-borne messages. If the message is coming from outside your tenant then they will delivered to the user's mailboxes in the same way as a 1:1 message, and you can access them with something like https://graph.microsoft.com/v1.0/users/{user_email}/messages?$filter=internetMessageId eq '{internetMessageId}'