Msteams-docs: Error: Not able to get response from get chat id endpoint

Created on 24 Jun 2021  Â·  10Comments  Â·  Source: MicrosoftDocs/msteams-docs

Hi,

I used to be able to hit the

GET https://graph.microsoft.com/beta/users/{user-id}/chats?$filter=installedApps/any(a:a/teamsApp/id eq '{teamsAppId}') endpoint until 2 weeks back with Chat.Read.All permissions in application-only context.

But now I'm getting a 412 error with this response message

{
  "error": {
    "code": "PreconditionFailed",
    "message": "Requested API is not supported in application-only context",
    "innerError": {
      "date": "2021-06-24T07:09:47",
      "request-id": "c40ca002-96dd-4dba-8016-51643ad1506a",
      "client-request-id": "c40ca002-96dd-4dba-8016-51643ad1506a"
    }
  }
}

Did something change? It would be great if I can get a quick response.

Thanks!

Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

bug teams-developer-support

All 10 comments

Hi mohsinhere! Thank you for bringing this issue to our attention. We will investigate and if we require further information we will reach out in one business day. Please use this link to escalate if you don't get replies.

Best regards, Teams Platform

Hi @mohsinhere - We will repro at our end and will get back to you.

Hi @mohsinhere - I am able to get the response from get chat id endpoint. Could you please add below permissions and check
image

Hi,

I'm using application permissions... and it has elevated permission: Chat.Read.All. Did you try using delegated or application permissions?

image

This is the permission set on the app registration. I cant use delegated here as it is an automated process that calls this.

@mohsinhere - With delegated level permissions, getting response from get chat id endpoint. With application level permissions I am able to reproduce your issue. So, Taking this for internal discussion with team and will update you.

@Mamatha-MSFT Thanks for looking into this.

Just an FYI that this endpoint used to work with application permissions until 2 weeks back.

Hi @mohsinhere - I have raised a bug for this issue and concerned engineering team is working on this.

@Mamatha-MSFT Thanks for the update. How long do you think the fix will take? I'm using this in a production bot and I will need to look at workarounds if the fix takes long.

Hi @mohsinhere - Concerned engineering team is working on fixing this issue and it is being tracked internally. Currently we don't have any workaround for this, we will update you immediately if it gets resolved but we do not have a firm timeline to share with you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

XimenaWang picture XimenaWang  Â·  6Comments

bezua picture bezua  Â·  7Comments

chris31389 picture chris31389  Â·  5Comments

krishnajaju picture krishnajaju  Â·  6Comments

camiloxs picture camiloxs  Â·  6Comments