List the teams a user belongs to
The user's team roster, ordered by team name. Each entry carries the team's name, so a client renders a page without resolving ids one by one.
This is the N:N roster and it is not lifecycle ownership: the single team
that owns the user's lifecycle is reported as metadata.lifecycle_owner_team_id
on the user read endpoints. Memberships the user was removed from are not
returned.
AuthorizationBearer <token>Scope: user.read, team_membership.read
user_id*stringThe unique identifier of the user.
^user_[a-zA-Z0-9_-]+$limit?integerMaximum number of items to return.
1 <= value <= 10020page_token?stringToken for fetching the next page of results.
Obtain this value from next_page_token in the previous response.
Omit to start from the beginning.
Its format is opaque and may change between releases.
The teams of a user are returned
application/json- response
Paginated list of the teams a user belongs to.
teams*array<>next_page_token?|Token to pass as page_token in the next request to fetch the following page.
Absent when there are no more results.
import { configureZitadel, getApi } from "@zitadel/api/config";// In the browser, through the SDK proxy: the session cookie authenticates the call.const client = getApi(configureZitadel({ projectId: "proj_01KWH1P4MYS7F0N9WD3P2E4YM5" }));const userTeams = await client.listUserTeams("user_01KWH3B72K7M7F0N9WD3P2E4YM");{ "teams": [ { "id": "string", "name": "string", "membership_status": "pending", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "next_page_token": "string"}Was this helpful?