Cli-microsoft365: New command: teams list

Created on 25 Oct 2020  路  2Comments  路  Source: pnp/cli-microsoft365

Usage

teams list [options]

Description

Lists all teams in a tenant

Options

| Option | Description |
| ----------------------- | ----------------------------------------- |

Additional Information

When looking at the GET-Team command of the MicrosoftTeams Module they perform following operations.

  • Enumerate all groups using graph and expand the properties
    /v1.0/groups?$filter=groupTypes/any(c:c+eq+'Unified')&$select=id,resourceProvisioningOptions,displayName,description,visibility,mailnickname,classification
  • Take the resourceProvisioningOptions array and filter by the ones having "Team" as value
    image
  • For each result hit the graph endpoint /v1.0/teams/{groupId} and retrieve teams specific metadata
  • Return these results
help wanted new feature

Most helpful comment

Just noticed that the command already exist. Closing the issue

All 2 comments

The benefit of this command is to retrieve all Teams of a tenant. We should consider what type of object we should return.

I feel a combination of properties of the first query + the results of the second Team specify objects might be an interesting choice

At this stage I haven't found filter options that might make sense. Maybe we could think about filters such as "isArchived" to get back archived teams. We could also think adding filters related to visibility (public, private)

Just noticed that the command already exist. Closing the issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andrewconnell picture andrewconnell  路  3Comments

waldekmastykarz picture waldekmastykarz  路  3Comments

vineet2907 picture vineet2907  路  3Comments

OodapowUiPath picture OodapowUiPath  路  3Comments

waldekmastykarz picture waldekmastykarz  路  3Comments