Unable to “List channel messages” on Azure AD Grap

2019-06-14 11:58发布

When I try to list channel messages I get:

[...] "code": "UnknownError", "message": "Failed to execute backend request." [...]

This error is for all teams I don't belong to.

I have this error when trying to call the API from Microsoft Flow (with HTTP GET) but also with Graph Explorer: the account I used has FULL permission but still asks to check my permission:

Failure - Status Code 403, 656ms Looks like you may not have the permissions for this call. Please modify your permissions

And the registered application has the delegated permission needed to call this endpoint regarding the documentation:

GET /teams/{id}/channels/{id}/messages

https://docs.microsoft.com/en-us/graph/api/channel-list-messages?view=graph-rest-beta

Is it a bug because of the "beta" or something I've missed?

1条回答
混吃等死
2楼-- · 2019-06-14 12:20

After searching and testing I can confirm that I was miss understanding how the delegated permission works.

The user need to have the permission to read the chat message meaning that the user need to be at least a member of the team who is concerned by the call.

I confirmed it by testing on a teams/groups where the account is not member of (result = Satus code 403) and everything is working with success after adding the account in the teams/groups

Does this mean that at the moment to be able to List channel messages from all teams in organisation we need to have a unique account member of each teams (=account used in the microsoft-graph call) ?

if anyone faced same situation this video helps to understand more easly the concept : https://www.youtube.com/watch?v=UPkHvy3eRCM

查看更多
登录 后发表回答