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.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
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

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

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.