Skip to main content

Bulk retrieves user information

POST/v2/users/listByIds

Batch retrieves account information based on a list of user IDs. A single request supports up to 100 user IDs.

Request​

Query parameters

    $select string

Body parameters

    ids string[]

    List of user IDs to query.

Response

    users object[]

    List corresponding to IDs. IDs that do not exist are not returned.

    id string

    User ID,

    email stringrequired

    Specifies the email address to display; must be one of the alias list.

    emailAliases string[]

    List of email address aliases.

    name stringrequired

    User name (person name).

    nickname string

    User nickname (or alias).

    defaultSendEmail string

    Default send email address (Optional field: returned when the $select=defaultSendEmail query parameter is added to the URL. Use commas to separate multiple fields.)

    employeeNo string

    Employee ID.

    jobTitle string

    Position.

    workLocation string

    Workplace.

    officeLocation string

    Workstation.

    homeLocation string

    Residence (Optional field: returned after adding the $select=homeLocation query parameter in the URL. Use commas to separate multiple fields).

    departmentIds string[]required

    List of departments the user belongs to, not the department chain. A user may belong to multiple departments simultaneously.

    phone string

    Phone number (Optional field: returned when the $select=phone query parameter is added to the URL. Use commas to separate multiple fields.)

    workPhone string

    Work phone number. (Optional field: returned when you add the $select=workPhone query parameter to the URL. To query multiple fields, separate them with commas.)

    status enum

    Account status (Normal or Frozen only). Only the domain administrator or an authorized application can modify it.

    • NORMAL: Normal
    • FREEZE: Frozen

    Possible values: [NORMAL, FREEZE]

    avatar object

    Avatar.

    url string

    Avatar URL.

    bgColor string

    Background color value when the avatar URL is empty. Example: #0089ff.

    createdTime string<date-time>

    Creation time.

    freezedTime string<date-time>

    Freeze time, readable by administrators or authorized applications (Optional field: returned when the query parameter $select=freezedTime is added to the URL; use commas to separate multiple fields).

    preferredLanguage string

    Language preference (ISO 639-1 Code, e.g., zh_CN/zh_TW/en_US) (Optional field: returned by adding the $select=preferredLanguage query parameter in the URL; use commas to separate multiple fields).

    modifiedTime string<date-time>

    Modification time.

    statusChangeReason string

    Account status change reason. Only modifiable by the domain administrator or an authorized application. (Optional field: Returned by adding the $select=statusChangeReason query parameter in the URL. For multiple fields, use commas to separate.)

    customName string

    Custom display name, the name displayed when sending emails.

    managerInfo object

    Manager details (Optional field: returned after adding the query parameter $select=managerInfo in the URL. Use commas to separate multiple fields.)

    id string

    Manager ID.

    email string

    Supervisor email address.

    name string

    Name.

    nickname string

    Nickname.

    managerEmail string

    Manager email, writable (Optional field: returned when the $select=managerEmail query parameter is added to the URL. Use commas to separate multiple fields).

    departmentPath object

    Department chain to which it belongs. If it belongs to multiple departments, multiple department chains are included (Optional field: returned after adding the $select=departmentPath query parameter in the URL. For multiple fields, separate them with commas).

    paths object[]

    Department chain.

    segments string[]

    Department node.

    enableClientPassword boolean

    Indicates whether the dedicated password is enabled (Optional field: returned when the query parameter $select=enableClientPassword is added to the URL; use commas to separate multiple fields).

    lastLoginTime string<date-time>

    Last login time (Optional field: returned when the query parameter $select=lastLoginTime is included in the URL; use commas to separate multiple fields).

    lastPasswordChangeTime string<date-time>

    Last password modification time (Optional field: returned when the $select=lastPasswordChangeTime query parameter is added to the URL. Use commas to separate multiple fields.).

    isInitialPassword boolean

    Whether it is the initial password (Optional field: returned after adding the $select=isInitialPassword query parameter to the URL. For multiple fields, separate them with commas).

    isHidden boolean

    Whether to hide from the address book. Only the administrator or authorized applications can access it and modify it. (Optional field: return by adding the $select=isHidden query parameter in the URL. Use commas to separate multiple fields.)

    lastLoginIp string

    Last login IP address (Optional field: Returned after adding the $select=lastLoginIp query parameter in the URL. For multiple fields, use English commas as separators.)

    info string

    Information notes. Only the domain administrator or authorized applications can access and modify this field. (Optional field: Returns after adding the $select=info query parameter to the URL. Use commas to separate multiple fields.)

    forceChangePasswordNextSignIn boolean

    Whether to force password change on next login. Only administrators or authorized applications can modify it. (Optional field: returned after adding the $select=forceChangePasswordNextSignIn query parameter in the URL. Use commas to separate multiple fields.)

    employeeType enum

    Account type. (Optional field: returned when the $select=employeeType query parameter is added to the URL. For multiple fields, separate them with commas.)

    • EMPLOYEE: Employee
    • CONTRACTOR: Contractor
    • INTERN: Intern
    • SERVICE: Shared account
    • WORK_ACCOUNT: Work account

    Possible values: [EMPLOYEE, CONTRACTOR, INTERN, SERVICE, WORK_ACCOUNT]

    passwordExpireTime string<date-time>

    Password expiration time. (Optional field: returned when the query parameter $select=passwordExpireTime is added to the URL. Separate multiple fields with commas.)

    lastLoginTime4StandardProtocol string<date-time>

    Last login time (standard protocol) (Optional field: returned when the $select=lastLoginTime4StandardProtocol query parameter is added to the URL. To request multiple fields, separate them with commas).

    orderInDepartments object[]

    Sort order of the account in different departments. The full set of department sort values must be provided. This field affects the account's sort order in other departments; in general, prefer using the API that sets the sort order for a single department. For example, if an account belongs to departments a, b, and c, and originally only had a sort value for department c, updating this field with sort values for departments a and b will result in the account having only sort values for departments a and b, and the original sort value for department c will be lost. Only accessible to administrators or authorized applications. This field is modifiable (Optional field: returned when the query parameter $select=orderInDepartments is added to the URL; use commas to separate multiple fields).

    departmentId string
    order string
    customFields object

    Custom field values added by the user. Supports partial modification; you do not need to pass all field values. Can only be modified by the user, an administrator, or an authorized application. Can be read in full via $select=customFields. Otherwise, only the value of a public field can be read via $select=customFields.<fieldID>.

    property name* string

    Custom field values added by the user. Supports partial modification; you do not need to pass all field values. Can only be modified by the user, an administrator, or an authorized application. Can be read in full via $select=customFields. Otherwise, only the value of a public field can be read via $select=customFields.<fieldID>.

Errors

401

Access is unauthorized. Please check whether the correct authorization token is passed.

403

No API access permission. Please complete the relevant authorization on the application management page of the domain administrator.