---
title: "get a user by id"
method: GET
path: "/users/:id"
tags: ["user"]
---

# get a user by id

`GET /users/:id`

This can only be done by a logged in user who has the required privileges.

## Path parameters

- `id` string, required

## Response `200`

User data

- UserObject
  - `id` string — User Id
  - `username` string, required — Username as an email address
  - `firstname` string, required — firstname
  - `lastname` string, required — lastname
  - `status` 'active' | 'pending' | 'disabled'
  - `role` Role, required
    - `name` string
    - `permissions` string[]
    - `tenant` string
    - `scope` string
  - `confirmed` boolean — true, if the confirmation link/email has been triggered
  - `img` string — url to user image

## Changes

- **2019-05-07** `8a89a8f58853` — 1 breaking, 2 warning, 9 info
  - removed the required property `_id` from the response with the `200` status
  - removed the optional property `createdAt` from the response with the `200` status
  - removed the optional property `updatedAt` from the response with the `200` status
  - removed `#/components/schemas/MutableUser` from the response body `allOf` list for the response status `200`
  - …8 more
- **2018-12-03** `a85cff4a1faa` — 4 breaking, 4 warning, 4 info
  - removed the required property `firstname` from the response with the `200` status
  - removed the required property `lastname` from the response with the `200` status
  - removed the required property `role` from the response with the `200` status
  - removed the required property `username` from the response with the `200` status
  - …8 more
- **2018-07-12** `1cc80c847b7e` — 1 info
  - added the required property `role` to the response with the `200` status

[Change history](https://skmtc.dev/openintegrationhub/apis/iam-api-for-oih/changes/users/:id/get.md)

---

[API](https://skmtc.dev/openintegrationhub/apis/iam-api-for-oih.md) · [All operations](https://skmtc.dev/openintegrationhub/apis/iam-api-for-oih/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openintegrationhub/iam-api-for-oih/revisions/8a89a8f58853/schema)
