My observations are that the same behavior can often be seen in the Teams client itself, especially when external users are involved, but not limited to them. I cannot even count the number of times I've seen "Unknown user" or simply no information whatsoever presented about the actor in a chat, meeting or channel message. So it wouldnt surprise me if Graph is returning similar data, although I definitely see it as an issue...
Chat members - DisplayName, Email, TenantId often null
I'm using the following calls (easily repro'd using Graph Explorer) to attempt to retrieve information about people I've chatted with in the past:
- https://graph.microsoft.com/beta/chats?expand=members&$select=id,lastUpdatedDateTime,chatType
- https://graph.microsoft.com/beta/chats/{chatId}/members/{memberId}
- https://graph.microsoft.com/beta/chats/{chatId}/messages
In each case, I'm looking for the display name, email and tenant ID of the members in the chat. What I'm finding is that for maybe about 50% of my chats, some or all of the fields I'm interested in are coming back null. Very occasionally, a particular chat member that has been returning null will return real values - i.e. I can sit refreshing Graph explorer looking at a particular chat member, and occasionally get the right details for them. It seems to happen more with external users, but not exclusively. There are some chats with internal users that are not bringing back the details I need. Is this a bug in the APIs, or something more fundamental that is unlikely to be fixed?