Get channels of teams belonging to a user

David Garcia 1 Reputation point
2022-03-01T07:26:50.567+00:00

Hello Community
I'm trying to get the channels of teams belonging to every user in my tenant, at the moment I get Teams joined for every user (https://graph.microsoft.com/v1.0/users/{user-id}/joinedTeams) but I don't know what can i do for get the next step with the channels because if I use (https://graph.microsoft.com/v1.0/teams/{team-id}/channels), only get all channels of Teams, Can you help me to get the information I need?

  Many thanks.
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Vasil Michev 119.8K Reputation points MVP Volunteer Moderator
    2022-03-01T08:47:26.96+00:00

    Not sure I understand what you mean here, can you be more specific? Generally speaking, channels do not "belong" to a user, every channel within a given Team can be accessed by all team members, and is "owned" by all team owners. Private channels have their separate membership/ownership, but are still associated with the "parent" Team, so again unclear if that's what you are looking for. Are you perhaps looking for a list of all Teams (and private channels) a given user is a member of?

    And since it seems that you are looking for information on the corresponding Graph API endpoints, I'll adjust the question tags.

    0 comments No comments

  2. David Garcia 1 Reputation point
    2022-03-01T09:07:08.877+00:00

    178796-api-graph.png

    I will try to do Api Graph action but always I receive the same channels because I don't know what can I do to get channels for another users..

    0 comments No comments

  3. CarlZhao-MSFT 46,376 Reputation points
    2022-03-01T10:28:11.973+00:00

    Hi @David Garcia

    I see what you mean, you want to get all the teams that the user joins and also expand the channels of each team. But based on my testing, the $expand query parameter doesn't seem to be supported at the moment. I recommend that you submit a user voice to add support for this feature.

    https://graph.microsoft.com/v1.0/users/{user id}/joinedTeams?$expand=channels  
    

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


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.