Error retrieving Teams Chat Messages with Graph API by Chat Member from other tenant

MOD Administrator 1 Reputation point
2022-07-22T13:34:45.627+00:00

Scenario: domain x user starts a chat with domain y user.

Domain x user can retrieve all required info via Graph API

Domain y user can retrieve via Graph API:

But in case user y tries to get a messages list (https://graph.microsoft.com/v1.0/users/{user}/chats/{chatId}/messages) it does not work

{
"error": {
"code": "BadRequest",
"message": "{\"errorCode\":201,\"message\":\"User Mri does not match request initiator!\"}",
"innerError": {
"date": "2022-07-22T13:28:48",
"request-id": "e9ec7b7a...",
"client-request-id": "e9858..."
}
}
}
How to retrieve this chat messages list?

Microsoft Security Microsoft Graph
{count} votes

1 answer

Sort by: Most helpful
  1. MOD Administrator 1 Reputation point
    2022-07-25T12:09:12.723+00:00

    Authorization Code

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.