Skip to content

teams channel member list

Lists members of the specified Microsoft Teams team channel

Usage

m365 teams channel member list [options]

Options

-i, --teamId [teamId]
The Id of the Microsoft Teams team. Specify either teamId or teamName but not both
--teamName [teamName]
The display name of the Microsoft Teams team. Specify either teamId or teamName but not both
-c, --channelId [channelId]
The Id of the Microsoft Teams team channel. Specify either channelId or channelName but not both
--channelName [channelName]
The display name of the Microsoft Teams team channel. Specify either channelId or channelName but not both
-r, --role [role]
Filter the results to only users with the given role: owner, member, guest
-h, --help [help]
Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, response, full. Default is full.
--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples
-o, --output [output]
Output type. json,text,csv. Default json
--verbose
Runs command with verbose logging
--debug
Runs command with debug logging

Examples

List the members of a specified Microsoft Teams team with id 00000000-0000-0000-0000-000000000000 and channel id 19:00000000000000000000000000000000@thread.skype

m365 teams channel member list --teamId 00000000-0000-0000-0000-000000000000 --channelId 19:00000000000000000000000000000000@thread.skype

List the members of a specified Microsoft Teams team with name Team Name and channel with name Channel Name

m365 teams channel member list --teamName "Team Name" --channelName "Channel Name"

List all owners of the specified Microsoft Teams team with id 00000000-0000-0000-0000-000000000000 and channel id 19:00000000000000000000000000000000@thread.skype

m365 teams channel member list --teamId 00000000-0000-0000-0000-000000000000 --channelId 19:00000000000000000000000000000000@thread.skype --role owner

Response

[
  {
    "id": "MCMjMiMjMGNhYzZjZGEtMmUwNC00YTNkLTljMTYtOWM5MTQ3MGQ3MDIyIyMxOTpCM25DbkxLd3dDb0dERUFEeVVnUTVrSjVQa2VrdWp5am13eHA3dWhRZUFFMUB0aHJlYWQudGFjdjIjIzc4Y2NmNTMwLWJiZjAtNDdlNC1hYWU2LWRhNWY4YzZmYjE0Mg==",
    "roles": [
      "owner"
    ],
    "displayName": "John Doe",
    "visibleHistoryStartDateTime": "0001-01-01T00:00:00Z",
    "userId": "78ccf530-bbf0-47e4-aae6-da5f8c6fb142",
    "email": "johndoe@contoso.onmicrosoft.com",
    "tenantId": "446355e4-e7e3-43d5-82f8-d7ad8272d55b"
  }
]
displayName: John Doe
email      : johndoe@contoso.onmicrosoft.com
id         : MCMjMiMjMGNhYzZjZGEtMmUwNC00YTNkLTljMTYtOWM5MTQ3MGQ3MDIyIyMxOTpCM25DbkxLd3dDb0dERUFEeVVnUTVrSjVQa2VrdWp5am13eHA3dWhRZUFFMUB0aHJlYWQudGFjdjIjIzc4Y2NmNTMwLWJiZjAtNDdlNC1hYWU2LWRhNWY4YzZmYjE0Mg==
roles      : ["owner"]
userId     : 78ccf530-bbf0-47e4-aae6-da5f8c6fb142
id,roles,displayName,userId,email
MCMjMiMjMGNhYzZjZGEtMmUwNC00YTNkLTljMTYtOWM5MTQ3MGQ3MDIyIyMxOTpCM25DbkxLd3dDb0dERUFEeVVnUTVrSjVQa2VrdWp5am13eHA3dWhRZUFFMUB0aHJlYWQudGFjdjIjIzc4Y2NmNTMwLWJiZjAtNDdlNC1hYWU2LWRhNWY4YzZmYjE0Mg==,"[""owner""]",John Doe,78ccf530-bbf0-47e4-aae6-da5f8c6fb142,johndoe@contoso.onmicrosoft.com