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

# Get user by id

> Returns a named user's name and email address from the identity provider. Authorized service accounts can resolve any user; a signed-in user can resolve only themselves.



## OpenAPI

````yaml /api-reference/organizations.openapi.json get /v1/users/{user_id}
openapi: 3.1.0
info:
  title: organizations
  description: ''
  license:
    name: ''
  version: 0.1.0
servers:
  - url: https://api.anthid.com
    description: Production
security: []
tags:
  - name: Organizations
    description: Create, read, update, and delete organizations
  - name: Organizations
    description: Resolve a user by id, and read, update, or delete the current user
  - name: Organizations
    description: Track organization onboarding progress
  - name: Organizations
    description: Receive user lifecycle events from WorkOS
paths:
  /v1/users/{user_id}:
    get:
      tags:
        - Organizations
      summary: Get user by id
      description: >-
        Returns a named user's name and email address from the identity
        provider. Authorized service accounts can resolve any user; a signed-in
        user can resolve only themselves.
      operationId: getUser
      parameters:
        - name: user_id
          in: path
          description: Identity-provider user ID
          required: true
          schema:
            type: string
          example: user_01KRM72V92J6KTBM7FHVF04YP5
      responses:
        '200':
          description: User information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetUserInfoResponse'
              example:
                email: ada@example.com
                name: Ada Lovelace
        '401':
          description: Missing or invalid authentication credentials
          content:
            text/plain:
              schema:
                type: string
        '403':
          description: Caller may not resolve this user
          content:
            text/plain:
              schema:
                type: string
        '404':
          description: No such user exists at the identity provider
          content:
            text/plain:
              schema:
                type: string
        '429':
          description: Caller exceeded the request rate limit
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Unexpected server error while reading the user
          content:
            text/plain:
              schema:
                type: string
      security:
        - bearerAuth: []
        - clientCredentials: []
components:
  schemas:
    GetUserInfoResponse:
      type: object
      required:
        - name
        - email
      properties:
        email:
          type: string
        name:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    clientCredentials:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Machine bearer token minted via the client_credentials grant.

````