
# 批量查询指定用户详情 - DescribeUsers
#### 功能介绍
批量查询指定用户详情。此操作只能由组织的管理账号或作为服务委托管理员的成员账号调用。
#### 授权信息
账号根用户具备所有API的调用权限，如果使用账号下的IAM用户调用当前API，该IAM用户需具备如下身份策略权限，更多的权限说明请参见[权限和授权项](https://support.huaweicloud.com/api-identitycenter/iic_04_0028.html)。
| 授权项                               | 访问级别 | 资源类型（\*为必须） | 条件键 | 别名 | 依赖的授权项                                     |
|:---|:---|:---|:---|:---|:---|
| IdentityCenter:user:describeUsers | Read | -           | -   | -  | organizations:delegatedAdministrators:list |
   
#### 调试
您可以在[API Explorer](https://console.huaweicloud.com/apiexplorer/#/openapi/IdentityCenter/doc?api=DescribeUsers)中调试该接口，支持自动认证鉴权。API Explorer可以自动生成SDK代码示例，并提供SDK代码示例调试功能。
#### URI
POST /v1/identity-stores/{identity_store_id}/users/batch-query
表1路径参数 
| 参数                | 是否必选 | 参数类型   | 描述              |
|:---|:---|:---|:---|
| identity_store_id | 是    | String | 身份源的全局唯一标识符（ID） |
   
#### 请求参数
表2请求Header参数 
| 参数               | 是否必选 | 参数类型   | 描述                                              |
|:---|:---|:---|:---|
| X-Security-Token | 否    | String | 如果正在使用临时安全凭据，则此header是必需的，该值是临时安全凭据的安全令牌（会话令牌）。 |
   
表3请求Body参数 
| 参数       | 是否必选 | 参数类型             | 描述            |
|:---|:---|:---|:---|
| user_ids | 是    | Array of strings | 用户唯一标识符（ID）列表 |
   
#### 响应参数
**状态码：200**
表4响应Body参数 
| 参数    | 参数类型                                                                           | 描述     |
|:---|:---|:---|
| users | Array of [DescribeUserResp] objects | 用户详情列表 |
   
 表5DescribeUserResp 
| 参数                 | 参数类型                                                                       | 描述                               |
|:---|:---|:---|
| addresses          | Array of [AddressDto] objects         | 用户的地址信息列表                        |
| display_name       | String                                                                     | 用户的显示名称                          |
| emails             | Array of [EmailDto] objects             | 用户的电子邮箱信息列表                      |
| external_id        | String                                                                     | 外部身份源分配给此资源的标识符                  |
| external_ids       | Array of [ExternalIdDto] objects   | 用户的外部标识符信息列表                     |
| identity_store_id  | String                                                                     | 身份源的全局唯一标识符（ID）                  |
| locale             | String                                                                     | 用户的地理区域或位置信息                     |
| name               | [NameDto] object                         | 包含用户姓名信息的对象                      |
| nickname           | String                                                                     | 用户昵称                             |
| phone_numbers      | Array of [PhoneNumberDto] objects | 用户的电话号码信息列表                      |
| preferred_language | String                                                                     | 用户语言首选项                          |
| profile_url        | String                                                                     | 与用户关联的URL                        |
| timezone           | String                                                                     | 用户时区                             |
| title              | String                                                                     | 用户头衔                             |
| user_id            | String                                                                     | 身份源中IdentityCenter用户的全局唯一标识符（ID） |
| user_name          | String                                                                     | 用户名，用于标识用户的唯一字符串                 |
| user_type          | String                                                                     | 用户类型                             |
| created_at         | Long                                                                       | 创建用户时的时间戳                        |
| created_by         | String                                                                     | 创建者                              |
| updated_at         | Long                                                                       | 更新用户时的时间戳                        |
| updated_by         | String                                                                     | 更新者                              |
| email_verified     | Boolean                                                                    | 一个布尔值，表示用户主的电子邮箱是否验证             |
| enabled            | Boolean                                                                    | 一个布尔值，表示用户是否启用                   |
| enterprise         | [EnterpriseDto] object             | 包含用户工作相关信息的对象                    |
   
 表6AddressDto 
| 参数             | 参数类型    | 描述                 |
|:---|:---|:---|
| country        | String  | 国家/地区              |
| formatted      | String  | 包含要显示的地址的格式化版本的字符串 |
| locality       | String  | 地址位置               |
| postal_code    | String  | 邮政编码               |
| primary        | Boolean | 一个布尔值，表示这是否是用户的主地址 |
| region         | String  | 区域                 |
| street_address | String  | 街道                 |
| type           | String  | 表示地址类型的字符串         |
   
 表7EmailDto 
| 参数                  | 参数类型    | 描述                   |
|:---|:---|:---|
| primary             | Boolean | 一个布尔值，表示这是否是用户的主电子邮箱 |
| type                | String  | 表示电子邮箱类型的字符串         |
| value               | String  | 包含电子邮箱地址的字符串         |
| verification_status | String  | 电子邮箱地址的验证状态          |
   
 表8ExternalIdDto 
| 参数     | 参数类型   | 描述                |
|:---|:---|:---|
| id     | String | 外部身份提供商颁发给此资源的标识符 |
| issuer | String | 外部标识符的颁发者         |
   
 表9NameDto 
| 参数               | 参数类型   | 描述                         |
|:---|:---|:---|
| family_name      | String | 用户的姓氏                      |
| formatted        | String | 包含要显示的名称的格式化版本的字符串display. |
| given_name       | String | 用户的名字                      |
| honorific_prefix | String | 用户的尊称前缀                    |
| honorific_suffix | String | 用户的尊称后缀                    |
| middle_name      | String | 用户的中间名                     |
   
 表10PhoneNumberDto 
| 参数      | 参数类型    | 描述                   |
|:---|:---|:---|
| primary | Boolean | 一个布尔值，表示这是否是用户的主电话号码 |
| type    | String  | 表示电话号码类型的字符串         |
| value   | String  | 包含电话号码的字符串           |
   
 表11EnterpriseDto 
| 参数              | 参数类型                                                     | 描述   |
|:---|:---|:---|
| cost_center     | String                                                   | 成本中心 |
| department      | String                                                   | 部门   |
| division        | String                                                   | 分部   |
| employee_number | String                                                   | 员工编号 |
| manager         | [ManagerDto] object | 经理   |
| organization    | String                                                   | 组织   |
   
 表12ManagerDto 
| 参数    | 参数类型   | 描述        |
|:---|:---|:---|
| value | String | Manager信息 |
   
**状态码：400**
表13响应Body参数 
| 参数         | 参数类型   | 描述     |
|:---|:---|:---|
| error_code | String | 错误码    |
| error_msg  | String | 错误信息   |
| request_id | String | 请求唯一标识 |
   
**状态码：403**
表14响应Body参数 
| 参数                            | 参数类型   | 描述      |
|:---|:---|:---|
| error_code                    | String | 错误码     |
| error_msg                     | String | 错误信息    |
| request_id                    | String | 请求唯一标识  |
| encoded_authorization_message | String | 加密的错误信息 |
   
#### 请求示例
批量查询指定用户详情
```
POST https://{hostname}/v1/identity-stores/{identity_store_id}/users/batch-query
{
  "user_ids" : [ "c59a3e4f-2cb2-4649-9874-3880664xxx" ]
}
```
#### 响应示例
**状态码：200**
Successful
```
{
  "users" : [ {
    "addresses" : [ {
      "country" : "country",
      "formatted" : "formatted",
      "locality" : "locality",
      "postal_code" : "postalCode",
      "primary" : false,
      "region" : "region",
      "street_address" : "streetAddress",
      "type" : "work"
    } ],
    "display_name" : "displayNamexxx",
    "emails" : [ {
      "primary" : true,
      "type" : "work",
      "value" : "xx@xx.com",
      "verification_status" : "NOT_VERIFIED"
    } ],
    "external_id" : "nickName",
    "external_ids" : [ {
      "id" : "nickName"
    } ],
    "identity_store_id" : "d-a23adaabca",
    "name" : {
      "family_name" : "familyNamedhf",
      "formatted" : "givenNameupdategfgdhf familyNamedhf",
      "given_name" : "givenNameupdategfgdhf"
    },
    "phone_numbers" : [ {
      "primary" : true,
      "type" : "work",
      "value" : "100845277237"
    } ],
    "title" : "title",
    "user_id" : "c59a3e4f-2cb2-4649-9874-38xxxx",
    "user_name" : "your name",
    "created_at" : 1753794283870,
    "created_by" : "SCIM/87905e14-e3ab-43dd-8a48-xxxx",
    "updated_at" : 1753794283878,
    "updated_by" : "SCIM/87905e14-e3ab-43dd-8a48-xxx",
    "email_verified" : false,
    "enabled" : true,
    "enterprise" : {
      "department" : "department",
      "employee_number" : "employeeNumber"
    }
  } ]
}
```
#### 状态码
| 状态码 | 描述          |
|:---|:---|
| 200 | Successful  |
| 400 | Bad request |
| 403 | Forbidden   |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-identitycenter/ErrorCode.html)。
