> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baseten.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a team user

> Get a user's roles on a team.

> [!WARNING]
>
> This endpoint is experimental and may change or be removed without notice.


## OpenAPI

````yaml get /v1/teams/{team_id}/users/{user_id}
openapi: 3.1.0
info:
  description: REST API for management of Baseten resources
  title: Baseten management API
  version: 1.0.0
servers:
  - url: https://api.baseten.co
security:
  - BearerAuth: []
paths:
  /v1/teams/{team_id}/users/{user_id}:
    parameters:
      - $ref: '#/components/parameters/team_id'
      - $ref: '#/components/parameters/user_id'
    get:
      summary: Gets a user on a team
      description: >-
        Returns a user's team roles. Returns 404 when the user has no access to
        the team. Needs `team.read` on the team; without it, returns 404. May be
        deprecated later in favor of another way to look up a team's users.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamUserV1'
      x-codeSamples:
        - lang: bash
          source: |
            curl --request GET \
            --url https://api.baseten.co/v1/teams/{team_id}/users/{user_id} \
            --header "Authorization: Bearer $BASETEN_API_KEY"
        - lang: python
          source: |-
            import requests
            import os
            API_KEY = os.environ.get("BASETEN_API_KEY", "<YOUR_API_KEY>")
            url = "https://api.baseten.co/v1/teams/{team_id}/users/{user_id}"

            headers = {"Authorization": f"Bearer {API_KEY}"}

            response = requests.request(
                "GET",
                url,
                headers=headers,
                json={}
            )

            print(response.text)
components:
  parameters:
    team_id:
      schema:
        type: string
      name: team_id
      in: path
      required: true
    user_id:
      schema:
        type: string
      name: user_id
      in: path
      required: true
  schemas:
    TeamUserV1:
      description: A user's access to a team.
      properties:
        team_id:
          description: Unique identifier of the team
          title: Team Id
          type: string
        team_name:
          description: Name of the team
          title: Team Name
          type: string
        user_id:
          description: Unique identifier of the user
          title: User Id
          type: string
        user_name:
          anyOf:
            - type: string
            - type: 'null'
          description: Name of the user, or their email address when they have no name
          title: User Name
        user_email:
          anyOf:
            - type: string
            - type: 'null'
          description: Email address of the user
          title: User Email
        direct_team_role:
          anyOf:
            - $ref: '#/components/schemas/TeamRoleV1'
            - type: 'null'
          description: >-
            Team role given to the user on this team; null when their access
            comes only from a directory group or from being an organization
            admin. Temporary; may be removed once fine-grained access control is
            available.
        effective_team_role:
          $ref: '#/components/schemas/TeamEffectiveRoleV1'
          description: >-
            Team role that applies: the strongest of the direct team role and
            the user's directory groups' team roles on this team, or `ADMIN` for
            an organization admin. Temporary; may be removed once fine-grained
            access control is available.
      required:
        - team_id
        - team_name
        - user_id
        - user_name
        - user_email
        - direct_team_role
        - effective_team_role
      title: TeamUserV1
      type: object
    TeamRoleV1:
      description: |-
        A team role a user can be given.

        Temporary; may be removed once fine-grained access control is available.
      enum:
        - TEAM_VIEWER
        - TEAM_MEMBER
        - TEAM_ADMIN
      title: TeamRoleV1
      type: string
    TeamEffectiveRoleV1:
      description: >-
        The team role that applies to a user, or `ADMIN` for an organization
        admin.


        Temporary; may be removed once fine-grained access control is available.
      enum:
        - TEAM_VIEWER
        - TEAM_MEMBER
        - TEAM_ADMIN
        - ADMIN
      title: TeamEffectiveRoleV1
      type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send `Authorization: Bearer <api_key>`. The legacy `Authorization:
        Api-Key <api_key>` scheme is also accepted.

````