Skip to Content
Xeonr Developer Docs

List My Teams

POST
/xeonr.auth.api.v1.TeamsService/ListMyTeams

Lists the teams the calling subject belongs to, filtered to teams entitled to the calling application. Includes the subject's team role and their per-application role names for the calling application.

Set include_unentitled to additionally return teams that are not yet entitled to this application (entitled=false, no application roles), each with can_enable — the picker for entitling an existing team via EnableTeamApplication. That form additionally requires a user subject and either auth:teams:manage:app, which returns the teams the user OWNS, or the org-wide auth:teams:manage, which returns every team the user is in so a console can show one it cannot act on rather than hiding it.

Required scopes: auth:teams:read

Authorization

AuthorizationBearer <token>

JWT access token obtained via OAuth2 flow or service account

In: header

Header Parameters

Connect-Protocol-Version?number

Define the version of the Connect protocol

Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

includeUnentitled?boolean

Also return teams that are not yet entitled to the calling application, so a product can offer "use one of your existing teams" without asking for a slug. Those entries carry entitled=false and a can_enable saying whether the caller could do it themselves.

Requires auth:teams:manage or auth:teams:manage:app in addition to auth:teams:read, and a user subject — a service account cannot entitle a team, so the listing would be dead weight for one.

How much it returns depends on the tier. Under auth:teams:manage:app it is the teams the user OWNS, which discloses nothing that tier does not already grant: such a client can already confirm any team its user owns by naming the slug. Under the org-wide auth:teams:manage it is every team the user is in, so a first-party console can show "this product is not enabled for that team" instead of hiding the team and looking broken.

[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://auth.xeonr.io/xeonr.auth.api.v1.TeamsService/ListMyTeams" \  -H "Connect-Protocol-Version: 1" \  -H "Connect-Timeout-Ms: 1000" \  -H "Content-Type: application/json" \  -d '{}'
{
  "teams": [
    {
      "team": {
        "teamId": "urn:xeonr:auth:team:0f3c9a2e-8f1b-4c2d-9e6a-1b2c3d4e5f60",
        "slug": "platform-core",
        "name": "Platform Core",
        "description": "string",
        "avatarUrl": "string",
        "createdAt": "2023-01-15T01:30:15.01Z",
        "company": {
          "companyId": "urn:xeonr:auth:company:7c1e0f4a-2b3d-4e5f-8a9b-0c1d2e3f4a5b",
          "slug": "acme",
          "name": "Acme Ltd",
          "description": "string",
          "avatarUrl": "string",
          "createdAt": "2023-01-15T01:30:15.01Z"
        }
      },
      "role": "TEAM_ROLE_UNSPECIFIED",
      "applicationRoles": [
        "writer"
      ],
      "entitled": true,
      "canEnable": true,
      "inheritedFrom": "urn:xeonr:auth:company:7c1e0f4a-2b3d-4e5f-8a9b-0c1d2e3f4a5b"
    }
  ]
}