Queries the list of users
GET/v2/users
Queries users in the current organization based on filter expressions and paginates using a cursor.
Filter Criteria
The supported filter fields are email, name, nickname, employeeNo, status, domain, employeeType, delegateType, departmentId, jobTitle, workLocation, homeLocation, info, managerId, and isSharedWithOthers. For example:
(departmentId=xxx): Queries users directly under the departmentxxx, excluding sub-departments.(departmentId=xxx*): Queries users in the departmentxxxand its sub-departments.(employeeNo=32901): Queries the user whose employee ID equals32901.(|(name=Jack)(email=*jack*)): The name is "Jack", or the email address containsjack.(&(employeeType=SERVICE)(email=*abc*)): Service accounts whose email addresses containabc.(&(departmentId=xxx)(!(status=FREEZE))): Users in the departmentxxxwhose status is not frozen.(domain=example.com): Users belonging to the subdomainexample.com.(delegateType=QUARANTINE): Users who have established a quarantine authorization relationship.
Sorting
Supports sorting by email, name, nickname, employeeNo, or createdTime.
Request
Query parameters
- ASC:
- DES:
Filter expression.
The query cursor. Leave blank to start from the beginning.
Page size, maximum is 100.
Sort field. If not specified, sorting is by creation time in descending order.
Possible values: [ASC, DES]
Returns only managed users. This field is only effective for administrator roles.
Response
- NORMAL: Normal
- FREEZE: Frozen
users object[]
User ID,
Specifies the email address to display; must be one of the alias list.
List of email address aliases.
User name (person name).
User nickname (or alias).
Employee ID.
Position.
Workplace.
Workstation.
List of departments the user belongs to, not the department chain. A user may belong to multiple departments simultaneously.
Account status (Normal or Frozen only). Only the domain administrator or an authorized application can modify it.
Possible values: [NORMAL, FREEZE]
avatar object
Avatar.
Avatar URL.
Background color value when the avatar URL is empty. Example: #0089ff.
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).
managerInfo object
Manager details (Optional field: returned after adding the query parameter $select=managerInfo in the URL. Use commas to separate multiple fields.)
Manager ID.
Supervisor email address.
Name.
Nickname.
Manager email, writable (Optional field: returned when the $select=managerEmail query parameter is added to the URL. Use commas to separate multiple fields).
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).
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. |