API to get the ms teams channels is failing for azure non admin users.

Rajesh Rajan 1 Reputation point
2020-09-08T17:27:32.12+00:00

We are able to get the joined teams for the user. With the team id, we are not able to get the channels for azure normal users. API to get the channels "https://graph.microsoft.com/v1.0/teams/team-id/channels" is failing with the error

{
error: {
code: 'Forbidden',
message: 'Failed to execute Skype backend request GetThreadRequest.',
innerError: {
date: '2020-07-29T21:09:30',
'request-id': '3c6e8d8a-fdff-433b-877e-c785690837f5'
}
}
}

Note: It is working fine for azure admin users. And we provided the Directory.Read.All, Group.ReadWrite.All delegated permission for the registered authentication app in azure. And we also granted the admin consent for those permissions.

We could n't understand why this happens? We are facing this issue in our production environment. This turning out to be a showstopper for us. Could you please take it as high priority and help us solve the issue?

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,069 questions
{count} votes

1 answer

Sort by: Most helpful
  1. soumi-MSFT 11,781 Reputation points Microsoft Employee
    2020-09-09T13:35:35.647+00:00

    @Rajesh Rajan , Thank you for reaching out. For the following API to work, you need to use a work or school account to login and get a token for the user using the Auth-Code Grant Flow. More details on this api can be found here: https://video2.skills-academy.com/en-us/graph/api/channel-list?view=graph-rest-1.0&tabs=http

    Hope this helps.

    Do let us know if this helps and if there are any more queries around this, please do let us know so that we can help you further. Also, please do not forget to accept the response as Answer; if the above response helped in answering your query.


Your answer

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