员工身份(EIAM)

根据用户id获取用户详情

接口

# 权限

身份管理API是以应用维度授权的,在调用接口前需为不同的应用设置接口权限,详情请参考API权限

权限代码 描述
user_all 用户管理接口的读写权限
user_read 用户管理接口的读权限
all 全部接口读写权限
read 所有读接口的权限

# 请求说明

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

# 请求头

参数名 中文名称 必须 类型 描述
Authorization 授权 String 格式:Bearer {access_token}
Content-Type 内容类型 String 固定值:application/json; charset=utf-8

# 请求示例

# 请求参数

参数名 中文名称 必须 类型 描述
user_id 用户ID String 用户ID

# 返回示例

正确示例:
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": {}
}


错误示例:
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

# 返回参数

参数名 中文名称 类型 描述
user_id 用户ID String
org_id 组织ID String
user_name 用户名 String
name 姓名 String
mobile 手机号 String
email 邮箱 String
first_name 名字 String
middle_name 中间名 String
last_name 姓氏 String
employee_id 员工工号 String
external_id 外部系统ID String
attr_gender 性别 String
attr_birthday 生日 String
attr_nick_name 昵称 String
attr_identity_type 证件类型 String
attr_identity_number 证件号码 String
attr_area 国家或地区 String
attr_city 城市 String
attr_manager_id 直属上级 String 上级用户id
attr_user_type 人员类型 String 类型id
attr_hire_date 入职时间 String
attr_work_place 工作地点 String
pwd_change_at 密码修改时间 String
created_at 用户创建时间 String
updated_at 用户修改时间 String
last_login_ip 最后登录IP String
last_login_at 最后登录时间 String
disabled 是否已禁用 String
grade 可信等级 Int
locked 锁定 Boolean
extension 扩展属性 JSONObject
user_org_relation_list 用户机构关系集合 List
--job_id 关系ID String
--org_id 组织ID String
--relation_type 关系类型 int 1为归属 0为挂靠
jobs 用户岗位集合 List 租户开启任职管理时返回
--job_id 岗位ID String
--org_id 组织ID String
--position_id 职位ID String
--title_id 职务ID String
--relation_type 岗位类型 String 1为主岗位 0为兼职兼岗

# 错误码

状态码 错误码 错误信息 处理措施
400 USER.0001 用户不存在 请检查对应用户是否存在
User does not exist