Nick Darvey's avatar
Nick Darvey
Copper Contributor
Oct 01, 2021
Status:
New

conversationThread should return original toRecipients email address

Repro

  1. Send an email to a (secondary) alias of a group
  2. Fetch the thread that is created from that email,
    GET https://graph.microsoft.com/v1.0/groups/123/threads/abc?$select=toRecipients

Expected

The microsoft.graph.conversationThread resource includes a `toRecipients` property returns an array which contains an item with the alias email address to which the email was sent.

 

Actual

The `toRecipients` property returns an array which contains an item with the primary email address of the group.

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groups('123')/threads(toRecipients)/$entity",
    "id": "abc",
    "toRecipients": [
        {
            "emailAddress": {
                "name": "Group Name",
                "address": "primary-email-address@my-domain.com"
            }
        },
        {
            "emailAddress": {
                "name": "Sender Name",
                "address": "sender@example.org"
            }
        }
    ]

 

Use case

We're trying to process threads conditionally based on the alias of the recipient group so that invoices sent to a specific alias of our 'accounts' group can be forwarded to an internal system.

 

Suggestion

While I'm sure this this behaviour can't be changed now (as others would rely on its current behaviour), it would be helpful to add an additional property which returns the actual email address, perhaps as part of the microsoft.graph.recipient resource type.

No CommentsBe the first to comment