Authorization Code
Error retrieving Teams Chat Messages with Graph API by Chat Member from other tenant
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:
- chat list : https://graph.microsoft.com/v1.0/users/{User}/chats
- chat: https://graph.microsoft.com/v1.0/users/{User}/chats/{chatId}
- chat message: https://graph.microsoft.com/v1.0/users/{user}/chats/{chatId}/messages/{messageId}
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?