How can I extract list of all members in a teams channel?

2026-10-07T14:54:00.45+00:00

How can I extract list of all members in a teams channel?

Microsoft Teams | Microsoft Teams for business | Teams and channels | Manage a team or channel
0 comments No comments

2 answers

Sort by: Most helpful
  1. Nam-D 4,170 Reputation points Microsoft External Staff Moderator
    2026-10-07T15:56:06.6266667+00:00

    Hello @Wendelöv, Vandana (Vino) (V.)

    To export the list of members from a Microsoft Teams channel, administrative access is required. Currently, there is no built-in feature that allows a Team owner to directly export channel members, and the Teams Admin Center does not provide an option to export channel membership lists.

    As a workaround, the member list can be exported using Microsoft Teams PowerShell and it would require the Microsoft Teams administrator.

    Please follow these steps:

    • Install the Microsoft Teams PowerShell module (if it is not already installed):Install-Module MicrosoftTeams -Scope CurrentUser
    • Connect to Microsoft Teams:
      Connect-MicrosoftTeams
    • Retrieve the Group ID of the Team by running: Get-Team Alternatively, the Group ID can also be obtained from the Microsoft Entra Admin Center under Groups > All groups.
    • Export the channel members by running: Get-TeamChannelUser -GroupId "<GroupID>" -DisplayName "<Channel Name>" | Export-Csv "C:\Temp\TeamMembers.csv" -NoTypeInformation
    • Please replace:
    • <GroupID> with the Team's Group ID from the previous step.
    • <Channel Name> with the exact display name of the channel.

    The export file path (C:\Temp\TeamMembers.csv) can be changed to any location of your choice.

    I hope this information is helpful. Please let me know if you need any assistance with the PowerShell commands or encounter any errors while running them.

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-10-07T14:54:15.12+00:00

    Use Microsoft Graph, depending on whether direct members only or all channel members are needed:

    • Direct members only: GET /teams/{team-id}/channels/{channel-id}/members
      • Returns members of standard, private, and shared channels.
      • For shared channels, this returns direct members only.
    • All members: GET /teams/{team-id}/channels/{channel-id}/allMembers
      • Returns all members in a channel.
      • For shared channels, this includes:
        • Direct members added directly to the channel
        • Indirect members from teams with which the channel is shared

    Important details:

    • A bearer token is required in the Authorization header.
    • allMembers supports $filter and $select query parameters.
    • On shared channels, only a user who is a member of the shared channel can retrieve the channel member list from the members API.
    • Membership IDs must be treated as opaque strings.

    Example HTTP request for all members:

    GET /teams/{team-id}/channels/{channel-id}/allMembers
    Authorization: Bearer {token}
    

    Example full Graph URL:

    GET https://graph.microsoft.com/v1.0/teams/2ab9c796-2902-45f8-b712-7c5a63cf41c4/channels/19%3A20bc1df46b1148e9b22539b83bc66809%40thread.skype/allMembers
    

    If using the Microsoft Graph SDK for C#:

    var result = await graphClient.Teams["{team-id}"].Channels["{channel-id}"].AllMembers.GetAsync();
    

    Required least-privileged permissions:

    • Delegated (work or school account): ChannelMember.Read.All
    • Application: ChannelMember.Read.Group

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

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