0
votes

In Teams, I have chat with someone whose not in my team. And when I use Graph API to list chat members, its response contains two members, and the response like this (I use '*' covered real id):

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#users('73445b6****************90c35f525a')/chats('19%3A73********************f525a_d1307158-d331-488e-9198-4a01ca7a508d%40unq.gbl.spaces')/members",
    "@odata.count": 2,
    "value": [
        {
            "@odata.type": "#microsoft.graph.aadUserConversationMember",
            "id": "d130715*******************01ca7a508d",
            "roles": [],
            "displayName": null,
            "userId": "d130715*******************01ca7a508d",
            "email": null
        },
        {
            "@odata.type": "#microsoft.graph.aadUserConversationMember",
            "id": "73445********************5f525a",
            "roles": [],
            "displayName": "my name",
            "userId": "73445********************5f525a",
            "email": null
        }
    ]
}

You can see that the other member's name is null. But I do see his name in Teams Desktop App.

Since I get his ID, so I tried https://graph.microsoft.com/beta/users/d130715*******************01ca7a508d

but response says it doesn't exist.

{
    "error": {
        "code": "Request_ResourceNotFound",
        "message": "Resource 'd130715*******************01ca7a508d' does not exist or one of its queried reference-property objects are not present.",
        "innerError": {
            "date": "2020-10-20T05:55:57",
            "request-id": "48fb241e-7ee5-4498-9eda-8642b4b1b499",
            "client-request-id": "40591cf1-ff64-f1d1-e658-a90dc7665ade"
        }
    }
}

Is there a way that I can get the member's name of an external chat?

1
Do we see the issue only if its external chat or internal chat too?Dev
I see this issue only when list members of external chats.T. Z.T
The error points that it can't find the member in the given chart; i suspect it most probably the external user who's part of the chat. Instead you can give a try getting their email address. I am not sure whether the external users name is enabled at this point.Dev
@Dev Yes, this chat has two members, and one of them is in another team. So the chat has an external mark. when I list members of this chat, I can get both of their id, but the one who's in another team, I can't get his name as well as his email. I'm sorry that I didn't get how to get their email address with only an user id. Every time I use /users/id/**, the response shows 'Resource *** does not exist or one of its queried reference-property objects are not present.' Could you show me an example?T. Z.T
Are you still facing the issue?Nikitha-MSFT

1 Answers

1
votes

Currently You cannot get the external user name using the graph API. This is by design.