Reputation: 357
I am trying to get a list of members in Microsoft teams graph API. I did not find anything in the official documents. I am able to get list of teams and channel but I need to get the list of members to belong to the specific channel. Can anyone have an idea how can I get that?
Upvotes: 1
Views: 1097
Reputation: 14168
Public channels don't have "members". The Team (basically group) has members. So you can find the list of members of a channel by listing the group members.
To support Private channels you need to use the beta API. There is no documented API to list the private channel members, but reading between the lines of the Private Channel Add Member API, my guess that if you do a:
GET https://graph.microsoft.com/beta/teams/<group_id>/channels/<channel_id>/members
you will get a list of private members. In fact it's documented here at the bottom of the page.
Upvotes: 3