This issue consists of 2 parts:
Add a new option
Currently, we can retrieve all joined teams by specifying the --joined flag. This endpoint returns all teams where the user is a direct member, the user has to be a member of the M365 group.
In case you are a member of a shared channel, you are not a member of the M365 group. This means that these teams are not listed in the response.
Let's add a new option:
| Option |
Description |
-j, --joined |
Show only joined teams that the user is a direct member of. Specify either joined or associated but not both. |
-a, --associated |
Show teams that a user is associated with. This includes direct membership and shared channels. Specify either joined or associated but not both. |
API: https://learn.microsoft.com/en-us/graph/api/associatedteaminfo-list?view=graph-rest-1.0&tabs=http
This API returns only limited information (id and displayName). After this, we should use Graph batching to get the entire team object.
Fix response for joined teams
To list all Teams within the tenant, we get all M365 groups and get the corresponding team. For joined teams, we use the joinedTeams Graph API endpoint. This endpoint only returns id, displayName and description. All other properties are null. This is quite annoying and apparently a known issue.

Therefore I suggest that we also use Graph batching to get the entire Team object. Just like we do with the regular teams team list command (with no options specified).
This issue consists of 2 parts:
Add a new option
Currently, we can retrieve all joined teams by specifying the
--joinedflag. This endpoint returns all teams where the user is a direct member, the user has to be a member of the M365 group.In case you are a member of a shared channel, you are not a member of the M365 group. This means that these teams are not listed in the response.
Let's add a new option:
-j, --joinedjoinedorassociatedbut not both.-a, --associatedjoinedorassociatedbut not both.API: https://learn.microsoft.com/en-us/graph/api/associatedteaminfo-list?view=graph-rest-1.0&tabs=http
This API returns only limited information (id and displayName). After this, we should use Graph batching to get the entire team object.
Fix response for joined teams
To list all Teams within the tenant, we get all M365 groups and get the corresponding team. For joined teams, we use the
joinedTeamsGraph API endpoint. This endpoint only returnsid,displayNameanddescription. All other properties arenull. This is quite annoying and apparently a known issue.Therefore I suggest that we also use Graph batching to get the entire Team object. Just like we do with the regular
teams team listcommand (with no options specified).