Skip to main content

teams user list

Lists users for the specified Microsoft Teams team

Usage

m365 teams user list [options]

Options

-i, --teamId <teamId>

The ID of the Microsoft Teams team for which to list users.

-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 options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Examples

List all users and their role in the specified Microsoft teams team.

m365 teams user list --teamId '00000000-0000-0000-0000-000000000000'

List all owners and their role in the specified Microsoft teams team.

m365 teams user list --teamId '00000000-0000-0000-0000-000000000000' --role Owner

Response

[
{
"id": "78ccf530-bbf0-47e4-aae6-da5f8c6fb142",
"displayName": "John Doe",
"userPrincipalName": "john@contoso.onmicrosoft.com",
"userType": "Owner"
}
]
CTRL + M