Share via

Get chat between user and teamsApp - BROKEN

Piotr Kolodziej 5 Reputation points
2023-03-08T14:24:11.4466667+00:00

We have an app that sends messages from a bot to a user. This code worked as per a week ago. During debugging process we discovered that we are no longer able to retrieve a chat conversation between an app and a user:

https://graph.microsoft.com/beta/users/{userId}/teamwork/installedApps/{appId}=**/chat**

as per: https://learn.microsoft.com/en-us/graph/api/userscopeteamsappinstallation-get-chat?view=graph-rest-1.0&tabs=http

NOTE: the same error happens when using both SDK and REST Graph Explorer. It is simply not possible to do /chat.

{
    "error": {
        "code": "BadRequest",
        "message": "BadRequest",
        "innerError": {
            "message": "",
            "code": "BadRequest",
            "innerError": {},
            "date": "2023-03-08T12:56:01",
            "request-id": "c1ab0b16-1e89-4ae3-81e5-e66c2116b1b3",
            "client-request-id": "aec8e813-08f6-262b-bfd6-c369411433c6"
        }
    }
}

Please note that:

https://graph.microsoft.com/beta/users/{userId}/teamwork/installedApps/{appId}=

works just fine.

Because there is nothing that was changed on our side, we believe it's a bug.

Can someone look into that?

Best Regards

Piotr Kolodziej

Microsoft Security | Microsoft Graph

1 answer

Sort by: Most helpful
  1. CharanyaB-MSFT 1,896 Reputation points
    2023-03-14T12:59:16.47+00:00

    Hello @Piotr Kolodziej,

    Thanks for reaching out!

    I am able to get the chat details using this GET https://graph.microsoft.com/beta/users/{userId}/teamwork/installedApps/{appId}/chat Graph API. I was not getting "Bad request" while trying to replicate your issue locally. Usually, this error occurs when the {app-installation-id} is invalid.

    Please validate that you are using a valid bot id in place of {app-installation-id} in your API request. Please let me know if the issue still persists.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.

    Was this answer helpful?

    0 comments No comments

Your answer

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