0
votes

I am testing Get Chat Microsoft Graph API (which is still in Beta) and it seems to work successfully when it is called from Graph Explorer (which uses an user token), instead when I call this API from Postman with an application token, I get 401 Unauthorized with an Unknown Error as response.

https://graph.microsoft.com/beta/users/<user-id>/chats/<conversation-id>

My App Registration on Azure has these permissions: enter image description here And the decoded application token contains:

The same token it works for the Get User API

https://graph.microsoft.com/beta/users/<user-id>

Basically, it seems to have problems only the GET Chat API when called with an application token, although the documentation says it is supported. Am I missing something in the App Registration configuration?

EDIT

As I have already explained in the comments, this question doesn't help me, since:

  • audit is correct
  • permissions are present in the token and are granted by the admin in the App registration
  • scope is correct enter image description here

Should I check something else?

1
No, I have already seen that question, but it didn't help me. My audit is correct, my scope is https://graph.microsoft.com/.default and I have the requested permissions (of type Application) granted by the Admin. Should I check something else?user2297037
Only delegated permission is supported for chat request.Jeremy

1 Answers

0
votes

Have you seen this message on the (English) documentation page?

Before calling this API with application permissions, you must request access. For details, see Protected APIs in Microsoft Teams.

It seems like Microsoft has implemented an extra layer of security for apps accessing "Teams" endpoints.