---
title: "Get a user's profile."
method: GET
path: "/users/{user_id}"
tags: ["user"]
---

# Get a user's profile.

`GET /users/{user_id}`

## Path parameters

- `user_id` integer, required

## Headers

- `X-Request-Id` string

## Response `200`

Get user's info successfully.

- UserResp
  - `email` string
  - `realname` string
  - `comment` string
  - `user_id` integer
  - `username` string
  - `sysadmin_flag` boolean
  - `admin_role_in_auth` boolean — indicate the admin privilege is grant by authenticator (LDAP), is always false unless it is the current login user
  - `oidc_user_meta` OIDCUserInfo
    - `id` integer — the ID of the OIDC info record
    - `user_id` integer — the ID of the user
    - `subiss` string — the concatenation of sub and issuer in the ID token
    - `secret` string — the secret of the OIDC user that can be used for CLI to push/pull artifacts
    - `creation_time` string, date-time — The creation time of the OIDC user info record.
    - `update_time` string, date-time — The update time of the OIDC user info record.
  - `creation_time` string, date-time — The creation time of the user.
  - `update_time` string, date-time — The update time of the user.

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `500` — Internal server error

---

[API](https://skmtc.dev/cerit/apis/harbor-api.md) · [All operations](https://skmtc.dev/cerit/apis/harbor-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cerit/harbor-api/revisions/62d78801f8df/schema)
