Get User Base Info


Get basic user information such as user ID based on the following information:

  • User email

  • User name and domain

  • Phone number and area code

Prerequisites


The application has been granted the “Obtain the ID, username, email, and phone number of all users in the OU” permission. Contact the OU administrator to get the permission if necessary.

Request Format


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

Request Parameters (Body)


In the following request parameters, except for organizationId, at least one parameter need to be specified to return results. If none of them are specified, no results will be returned. If multiple parameters are specified at the same time, the search priority is as follows:

  1. email

  2. name and domain

  3. phone and phoneArea


Name

Required/Optional

Data Type

Description

organizationId

Required

String

The OU ID. How to get organizationId >>

email

Optional

String

The user’s email address.

name

Optional

String

User name. If the user account is a domain account, the domain parameter needs to be specified at the same time.

domain

Optional

String

Domain name. This parameter can be specified when the user account is a domain account and needs to be specified together with the name parameter.

phoneArea

Optional

String

Telephone area code. If specified, the phone parameter needs to specified at the same time.

phone

Optional

String

Phone number. If specified, the phoneArea parameter needs to specified at the same time.

Response Parameters


Name

Data Type

Description

users

SimpleUserDTO Struct

The list of basic information about the user. SimpleUserDTO Struct >>

SimpleUserDTO Struct


Name

Data Type

Description

id

String

The user ID.

name

String

The user name.

domain

String

The domain that the user belongs to.

email

String

The user’s email address.

company

String

The company that the user works for.

department

String

The department that the user belongs to.

position

String

The position of the user.

accountStartTime

String

The time when the user account becomes effective.

accountExpireTime

String

The expiration time of the user account.

updatedTime

String

The update time of the user information.

Error Codes


Code

Description

31400

Errors such as incorrect parameters, empty parameters, and so on

31403

The application has not been granted the “Obtain the ID, username, email, and phone number of all users in the OU” permission

31404

Errors such as OU not found, user not found, and so on

Samples

Request Sample


url: https://{apigw-address}/app-portal-service/v2.2/user/getUserBaseInfo

method: POST

requestBody:
{"organizationId":"yourOrgId", "email":"yourEmail"}

Return Sample


{
  "code": 0,
  "message": "OK",
  "data": {
    "users": [
      {
        "id": "your_user_id",
        "name": "your_user_name",
        "domain": "",
        "email": "your_user_email",
        "company": "your_user_company",
        "position": "your_user_position",
        "department": "your_user_department"
      }
    ]
  }
}