1
votes

Why am I getting different results in the "sender" address field when using $select?

In Microsoft Explorer when I run this query:

https://graph.microsoft.com/v1.0/me/messages?$filter=(contains(subject,'test'))

I get back this result in the "sender" field:

"sender": {
            "emailAddress": {
                "name": "John Doe",
                "address": "[email protected]"
            }
        },

But when I execute this query:

https://graph.microsoft.com/v1.0/me/messages?$filter=(contains(subject,'test'))&$select=sender

I get back the internal email for the "sender" field:

"sender": {
            "emailAddress": {
                "name": "John Doe",
                "address": "/O=EXCHANGELABS/OU=EXCHANGE ADMINISTRATIVE GROUP (FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=E0CC9D18EE294E43890D4830339D5-JDOE"
            }
        }

I want to limit data coming back from the endpoint with $select, but I do not want the internal email. Can I force it to return the non-internal email address?

1

1 Answers

0
votes

I just had this problem and looks like selecting replyTo fixed it for me. (I'm selecting these: subject,receivedDateTime,sender,bodyPreview,from,replyTo)