---
title: "Get user by id from a directory"
method: GET
path: "/api/v1/dsync/users/{userId}"
tags: ["Directory Sync"]
---

# Get user by id from a directory

`GET /api/v1/dsync/users/{userId}`

## Path parameters

- `userId` string, required

## Query parameters

- `tenant` string
- `product` string
- `directoryId` string

## Response `200`

Success

- User
  - `id` string — User ID
  - `first_name` string — First name
  - `last_name` string — Last name
  - `email` string — Email address
  - `active` boolean — Indicates whether the user is active or not
  - `raw` object — Raw user attributes from the Identity Provider

## Changes

- **2025-02-05** `f02a45abeffc` — 1 info
  - added the media type `application/json` for the response with the status `200`
- **2024-12-22** `d49c203898c2` — 1 breaking
  - removed the media type `application/json` for the response with the status `200`

[Change history](https://skmtc.dev/ory/apis/enterprise-sso-directory-sync/changes/api/v1/dsync/users/:userId/get.md)

---

[API](https://skmtc.dev/ory/apis/enterprise-sso-directory-sync.md) · [All operations](https://skmtc.dev/ory/apis/enterprise-sso-directory-sync/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ory/enterprise-sso-directory-sync/revisions/d92c991ace28/schema)
