Employee Identity (EIAM)

Get User Details by User ID

API

# Permissions

The Identity Management API is authorized at the application level. Before calling the API, you need to set interface permissions for different applications. For details, please refer to API Permissions.

Permission Code Description
user_all Read and write permissions for user management interfaces
user_read Read permission for user management interfaces
all Read and write permissions for all interfaces
read Permission for all read interfaces

# Request Description

GET https://{your_domain}/api/v2/tenant/users/{user_id}

# Request Headers

Parameter Name Chinese Name Required Type Description
Authorization Authorization Yes String Format: Bearer {access_token}
Content-Type Content Type Yes String Fixed value: application/json; charset=utf-8

# Request Example

None

# Request Parameters

Parameter Name Chinese Name Required Type Description
user_id User ID Yes String User ID

# Response Example

Correct Example:
HTTP/1.1 200 OK
Content-Type: application/json
{
    "user_id": "20220825141325371-4D03-81EF80243",
    "org_id": "20210529172248496-D329-5748DE918",
    "user_name": "cq04130007",
    "name": "cq04130007",
    "mobile": "+86-15204130007",
    "email": "15204130007@example.com",
    "first_name": "F",
    "middle_name": "M",
    "last_name": "L",
    "employee_id": "041300071",
    "external_id": "041300071",
    "attr_city": "武汉",
    "attr_nick_name": "cq04130007",
    "attr_area": "CN",
    "attr_gender": "male",
    "attr_work_place": "武汉",
    "attr_identity_type": "id_card",
    "attr_identity_number": "420100199911111111",
    "attr_manager_id": "20210601223953060-2AEC-D22770B77",
    "attr_birthday": "1993-08-25 00:00:00.000",
    "attr_user_type": "20211124152258971-9F54-3B43283CC",
    "attr_hire_date": "2022-08-01 00:00:00.000",
    "pwd_must_modify": false,
    "disabled": false,
    "locked": false,
    "grade": 1,
    "created_at": "2022-08-25 14:13:25.372",
    "updated_at": "2022-08-25 14:37:24.610",
    "last_login_ip": "120.46.143.105",
    "last_login_at": "2024-06-06 15:14:28.000",
    "user_org_relation_list": [
        {
            "org_id": "20220221173529886-B8BB-9F404BCDE",
            "relation_type": 0
        },
        {
            "org_id": "20210529172248496-D329-5748DE918",
            "relation_type": 1
        }
    ],
    "extension": {}
}


Error Example:
HTTP/1.1 400 Bad Request
{
  "error_msg": "用户不存在",
  "error_code": "USER.0001"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

# Response Parameters

Parameter Name Chinese Name Type Description
user_id User ID String
org_id Organization ID String
user_name Username String
name Name String
mobile Mobile Number String
email Email String
first_name First Name String
middle_name Middle Name String
last_name Last Name String
employee_id Employee ID String
external_id External System ID String
attr_gender Gender String
attr_birthday Birthday String
attr_nick_name Nickname String
attr_identity_type ID Type String
attr_identity_number ID Number String
attr_area Country/Region String
attr_city City String
attr_manager_id Direct Manager String Superior User ID
attr_user_type Personnel Type String Type ID
attr_hire_date Hire Date String
attr_work_place Workplace String
pwd_change_at Password Change Time String
created_at User Creation Time String
updated_at User Modification Time String
last_login_ip Last Login IP String
last_login_at Last Login Time String
disabled Whether Disabled String
grade Trust Level Int
locked Locked Boolean
extension Extended Attributes JSONObject
user_org_relation_list User-Organization Relation Collection List
--job_id Relation ID String
--org_id Organization ID String
--relation_type Relation Type int 1 for belonging, 0 for affiliation
jobs User Job Position Collection List Returned when tenant enables position management
--job_id Job ID String
--org_id Organization ID String
--position_id Position ID String
--title_id Title ID String
--relation_type Job Type String 1 for primary position, 0 for part-time/concurrent position

# Error Codes

Status Code Error Code Error Message Action
400 USER.0001 User does not exist Please check if the corresponding user exists