Get Organization User List


Authorize an application to get a list of all the users under a specified organization (OU) without logging in to the Application Portal.

Prerequisite


The associated application must have access permissions (authorized by the organization administrator) to get the user information.

Request Format


POST https://{apigw-address}/app-portal-service/v2.2/user/organization/roster

Request Parameters (Body)


Name Mandatory/Optional Data Type Description
orgId Mandatory String The organization ID which the asset belongs to. How to get orgId >>
pagination Mandatory Pagination Request Struct Lists the paging requirements in a request. If not specified, the default pagination size is 1000 pages, starting from 0. For more details, see Pagination Request Struct

Response Parameters


Name Data Type Description
data Data Struct The pagination and list of the users’ information

Data Struct


Name Data Type Description
pagination Pagination Struct The pagination information
users Array of Users Struct The list of the users’ information

Pagination Struct


Name Data Type Description
pageNo Integer The request pages
pageSize Integer The number of records in each page
totalElements Long The total number of records

Users Struct


Name Data Type Description
userId String The user ID
email String The user’s registered email
phone String The user’s registered phone number
phoneArea String The area code of the user’s registered phone number
name String The user name

Error Codes


Code Description
31400 Organization ID and pagination value are required
31403 The application is not authorized to access user information
31404 Can not find this organization

Samples

Request Sample


url: https://{apigw-address}/app-portal-service/v2.2/user/organization/roster
method: POST
requestBody:
{
  "orgId": "yourOrgId",
  "pagination": {
    "pageNo": 0,
    "pageSize": 1000,
    "sorters": []
  }
}

Return Sample


{
  "code": 0,
  "message": "",
  "data": {
    "users": [
      {
        "userId": "userId_1",
        "email": "1234",
        "phone": "",
        "phoneArea": "",
        "name": "1234"
      },
      {
        "userId": "userId_2",
        "email": "71019669@qq.com",
        "phone": "",
        "phoneArea": "",
        "name": "wyf"
      }
    ],
    "pagination": {
      "totalElements": 2,
      "pageNo": 0,
      "pageSize": 1000
    }
  }
}