---
title: "Fetch user ID by username"
method: GET
path: "/restapi/json/v1/user/getUserId"
tags: ["Users"]
---

# Fetch user ID by username

`GET /restapi/json/v1/user/getUserId`

## Request

- Base URL: `https://Hostname:Port`
- URL: `https://Hostname:Port/restapi/json/v1/user/getUserId`
- Auth: API key in header `AUTHTOKEN`
- TypeScript: <https://skmtc.dev/manageengine/apis/pam360-rest-api/docs/restapi/json/v1/user/getUserId/get.ts> (a function with typed inputs; its response is checked against the schema)

This API retrieves the PAM360 User ID by supplying the username.

## Query parameters

- `USERNAME` string, required

## Headers

- `orgName` string

## Response `200`

User ID

- GetUserIdResponse
  - `operation` object
    - `result` OperationResult
      - `message` string: Result message describing the operation outcome
      - `status` string: Operation status
    - `Details` object
      - `USERID` string: Unique identifier of the user.
    - `name` string

---

[API](https://skmtc.dev/manageengine/apis/pam360-rest-api.md) - [All operations](https://skmtc.dev/manageengine/apis/pam360-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/manageengine/apis/pam360-rest-api/revisions/44a47abb4bdb?raw)
