---
title: "Retrieves a user object by the given id. (Auth scopes: identityprovider_service_api, identityprovider_users_api)"
url: "https://developer.tesma.com/apis/idp-public-api-2/versions/3a3d30d9-10e8-4c7b-9457-d1f146a3a3fe/paths/api-v1-users-id/get"
---

> Full API specification: https://developer.tesma.com/apis/idp-public-api-2/versions/3a3d30d9-10e8-4c7b-9457-d1f146a3a3fe.md

# Retrieves a user object by the given id. (Auth scopes: identityprovider_service_api, identityprovider_users_api)

`GET` `/api/v1/users/{id}`

This endpoint provides access to retrieve user information.

## Path parameters

- `id` (string, required) - The unique user id or user name

## Responses

- `200` - OK
- `401` - Unauthorized
- `403` - Forbidden
- `404` - Not Found

## OpenAPI definition

```yaml
openapi: 3.1.1
info:
  title: CHG IdentityProvider API v1
  version: 2.3.44.0
paths:
  /api/v1/users/{id}:
    get:
      description: This endpoint provides access to retrieve user information.
      parameters:
        - description: The unique user id or user name
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              example:
                claims:
                  - claimType: is_chg_employee
                    value: "true"
                    valueType: String
                  - claimType: AzureOID
                    value: "12313"
                    valueType: String
                email: peter.test@chg-meridian.com
                emailConfirmed: true
                firstName: Peter
                id: C11977A4-B9DD-449D-BA5C-446C79A32CD1
                isBlocked: false
                isDeleted: false
                lastName: Test
                lockoutEnd: null
                phoneNumber: null
                roles:
                  - description: QA Manager
                    id: 5CCE5D79-005A-45BD-A1F4-D6F1BE11DF68
                    name: TestManager
                userName: peter.test@chg-meridian.com
              schema:
                $ref: "#/components/schemas/User"
          description: OK
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
          description: Not Found
      security:
        - oauth2:
            - IdentityProviderOrUserApi
      summary: "Retrieves a user object by the given id. (Auth scopes:
        identityprovider_service_api, identityprovider_users_api)"
      tags:
        - Users
security:
  - oauth2:
      - IdentityProviderOrUserApi
components:
  schemas:
    User:
      additionalProperties: false
      properties:
        claims:
          items:
            $ref: "#/components/schemas/UserClaim"
          type:
            - "null"
            - array
        email:
          type:
            - "null"
            - string
        emailConfirmed:
          type: boolean
        firstName:
          type:
            - "null"
            - string
        id:
          type:
            - "null"
            - string
        isBlocked:
          type: boolean
        isDeleted:
          type: boolean
        lastName:
          type:
            - "null"
            - string
        lockoutEnd:
          format: date-time
          type:
            - "null"
            - string
        phoneNumber:
          type:
            - "null"
            - string
        roles:
          items:
            $ref: "#/components/schemas/UserRole"
          type:
            - "null"
            - array
        userName:
          type:
            - "null"
            - string
      type: object
    ProblemDetails:
      additionalProperties: {}
      properties:
        detail:
          type:
            - "null"
            - string
        instance:
          type:
            - "null"
            - string
        status:
          format: int32
          type:
            - "null"
            - integer
        title:
          type:
            - "null"
            - string
        type:
          type:
            - "null"
            - string
      type: object
    UserClaim:
      additionalProperties: false
      properties:
        claimType:
          type:
            - "null"
            - string
        value:
          type:
            - "null"
            - string
        valueType:
          type:
            - "null"
            - string
      type: object
    UserRole:
      additionalProperties: false
      properties:
        description:
          type:
            - "null"
            - string
        id:
          type:
            - "null"
            - string
        name:
          type:
            - "null"
            - string
      type: object
  securitySchemes:
    oauth2:
      description: 'Standard Authorization header using the Bearer scheme. Example:
        "bearer {token}"'
      in: header
      name: Authorization
      type: apiKey
```
