How to Access Members of a Private Channel in Microsoft Teams?

0
13
Asked By CuriousCoder42 On

I'm trying to connect to Microsoft Teams through App Registration and the Microsoft Graph API. I've managed to get a list of team names and members from the General channel, but I hit a roadblock when trying to access the details of members in a private channel. I keep getting a 403 forbidden error. I've set the following API permissions: Channel.ReadBasic.All, ChannelMember.Read.All, Directory.Read.All, Group.Read.All, Team.ReadBasic.All, TeamMember.Read.All, and User.Read.All. Any advice would be really helpful. Thanks!

3 Answers

Answered By PowerShellPro On

You might want to check if you have the ChannelMember.Read.Group permission. Are you running this on behalf of a user or as a service? Check out the permissions document for more details! Also, running your requests through the Microsoft Graph Explorer could help.

Answered By TechGuru99 On

Have you granted your application access to the specific channel or team? That's usually necessary to make it work.

Answered By AdminInsight On

If I recall correctly, you need to assign your service principal the Teams Admin role to manage or view private groups it isn’t a member of. It's something I've had to do for other scenarios before.

CuriousCoder42 -

I haven't tried that yet, but I’ll give it a shot. Thanks for the tip!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.