All Products
Search
Document Center

Data Management:ListUsers

Last Updated:Aug 28, 2026

Queries DMS user details.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dms:ListUsers

list

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Tid

integer

No

The tenant ID. Call GetUserActiveTenant to query it.

3***

Role

string

No

The role assigned to the user. Valid values:

  • USER: a regular user.

  • DBA: a database administrator (DBA).

  • ADMIN: a DMS administrator.

  • SECURITY_ADMIN: a security administrator.

  • STRUCT_READ_ONLY: a schema read-only user.

Note

To check your role, hover over your profile picture in the DMS console.

DBA

UserState

string

No

The user status. Valid values:

  • NORMAL: The user is normal.

  • DISABLE: The user is disabled.

  • DELETE: The user is deleted.

NORMAL

SearchKey

string

No

The search keyword. Supports fuzzy matching.

test

PageNumber

integer

No

The page number to return.

1

PageSize

integer

No

The number of entries per page. Valid values: 10, 20, 50, 100. Default value: 10.

10

Response elements

Element

Type

Description

Example

object

TotalCount

integer

The total number of users returned.

3

RequestId

string

The request ID.

69161997-6030-53BA-A333-DBEC83B732FF

ErrorCode

string

The error code if the request failed.

InvalidTid

ErrorMessage

string

The error message if the request failed.

Specified parameter Tid is not valid.

UserList

object

User

array<object>

The user details.

array<object>

The user details.

State

string

The user status. Valid values:

  • NORMAL: The user is normal.

  • DISABLE: The user is disabled.

  • DELETE: The user is deleted.

NORMAL

CurResultCount

integer

The number of rows queried today.

0

UserId

string

The user ID.

8****

LastLoginTime

string

The last time the user logged in to the DMS console.

2021-11-08 13:43:43

MaxResultCount

integer

The maximum number of rows that can be queried today.

50000

ParentUid

string

The Alibaba Cloud account ID of the user.

140692647406****

RoleIdList

object

RoleIds

array

The role IDs.

integer

The role ID assigned to the user. Valid values:

  • 1: a regular user role.

  • 2: a DBA role.

  • 3: a DMS administrator role.

  • 4: a security administrator role.

  • 6: a schema read-only user role.

3

RoleNameList

object

RoleNames

array

The role names.

string

The role name assigned to the user. Valid values:

  • USER: a regular user.

  • DBA: a DBA.

  • ADMIN: a DMS administrator.

  • SECURITY_ADMIN: a security administrator.

  • STRUCT_READ_ONLY: a schema read-only user.

ADMIN

NickName

string

The user nickname.

test_NickName

MaxExecuteCount

integer

The maximum number of queries allowed today.

2000

CurExecuteCount

integer

The number of queries performed today.

0

Mobile

string

The user's mobile number.

Note
  • Returned only if configured. To set a mobile number, hover over your profile picture and click the Edit icon next to Notice.

  • Not returned if no mobile number is configured.

1389999****

Uid

string

The Alibaba Cloud account ID.

167382665015****

Email

string

The notification email address.

Note
  • Returned only if configured. To set an email address, hover over your profile picture and click the Edit icon next to Notice.

  • Not returned if no email address is configured.

username@example.com

DingRobot

string

The DingTalk chatbot URL for notifications.

Note
  • Returned only if configured. To set a DingTalk chatbot URL, hover over your profile picture and click the Edit icon next to Notice.

  • Not returned if no DingTalk chatbot URL is configured.

https://XXX.dingtalk.com/robot/send?access_token=9b7a4a562cbe7fcdea9962afac7b9d7b4504d564948083419750f9cafa78e4ef

Webhook

string

The webhook URL for notifications.

Note
  • If configured, DMS sends notifications to the specified URL.

  • Not returned if no webhook URL is configured.

http://dms-XXX.aliyun.com:8***

SignatureMethod

string

The signature method for webhook connections. Valid values:

  • NONE: no signature.

  • HMAC_SHA1: HMAC-SHA1 signature.

HMAC_SHA1

NotificationMode

string

The notification method. One or more values may be returned. Valid values:

  • SMS: text message

  • EMAIL: email.

  • DINGDING: DingTalk.

  • DINGROBOT: DingTalk chatbot.

  • WEBHOOK: webhook.

DINGROBOT

Success

boolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.

  • false: The request failed.

true

Examples

Success response

JSON format

{
  "TotalCount": 3,
  "RequestId": "69161997-6030-53BA-A333-DBEC83B732FF",
  "ErrorCode": "InvalidTid",
  "ErrorMessage": "Specified parameter Tid is not valid.",
  "UserList": {
    "User": [
      {
        "State": "NORMAL",
        "CurResultCount": 0,
        "UserId": "8****",
        "LastLoginTime": "2021-11-08 13:43:43",
        "MaxResultCount": 50000,
        "ParentUid": "140692647406****",
        "RoleIdList": {
          "RoleIds": [
            3
          ]
        },
        "RoleNameList": {
          "RoleNames": [
            "ADMIN"
          ]
        },
        "NickName": "test_NickName",
        "MaxExecuteCount": 2000,
        "CurExecuteCount": 0,
        "Mobile": "1389999****",
        "Uid": "167382665015****",
        "Email": "username@example.com",
        "DingRobot": "https://XXX.dingtalk.com/robot/send?access_token=9b7a4a562cbe7fcdea9962afac7b9d7b4504d564948083419750f9cafa78e4ef",
        "Webhook": "http://dms-XXX.aliyun.com:8***",
        "SignatureMethod": "HMAC_SHA1",
        "NotificationMode": "DINGROBOT"
      }
    ]
  },
  "Success": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.