ListUsers

Updated at:

Queries EIAM account information by using paging.

Operation description

This operation queries only the direct permissions of the organization, which are the applications directly assigned to the organization. When you call this operation, you can use the ApplicationIds parameter to filter applications.

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

eiam:ListUsers

list

*User

acs:eiam:{#regionId}:{#accountId}:instance/{#InstanceId}/user/*

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID.

idaas_ue2jvisn35ea5lmthk267xxxxx

PageNumber

integer

No

The page number. Default value: 1.

1

PageSize

integer

No

The number of entries per page. Default value: 20. Maximum value: 100.

20

UserIds

array

No

The list of account IDs.

["user_d6sbsuumeta4h66ec3il7yxxxx"]

string

No

The account ID.

user_d6sbsuumeta4h66ec3il7yxxxx

UsernameStartsWith

string

No

The username prefix for a left-match query.

name_001

DisplayNameStartsWith

string

No

The display name prefix for a left-match query.

name

PhoneRegion

string

No

The region code of the mobile phone number. Example: 86 for the Chinese mainland, without 00 or +.

86

PhoneNumber

string

No

The mobile phone number of the account.

156xxxxxxx

Email

string

No

The email address of the account.

user@example.com

UserExternalId

string

No

The external ID, which is used to map external data to IDaaS accounts.

Note: The external ID must be unique within the same source type and source ID.

id_wovwffm62xifdziem7an7xxxxx

UserSourceId

string

No

The source ID of the account.

For the built-in type, the default value is the instance ID. For other types, the value corresponds to the enterprise ID of the source. For example, the DingTalk source corresponds to the corpId of the DingTalk enterprise.

idaas_ue2jvisn35ea5lmthk267xxxxx

UserSourceType

string

No

The source type of the account. Valid values:

  • build_in: built-in.

  • ding_talk: imported from DingTalk.

  • ad: imported from AD.

  • ldap: imported from LDAP.

  • we_com: imported from WeCom.

build_in

Status

string

No

The status of the account. Valid values:

  • enabled: enabled.

  • disabled: disabled.

enable

OrganizationalUnitId

string

No

The organizational unit ID.

ou_wovwffm62xifdziem7an7xxxxx

NextToken

string

No

The query token.

NTxxxxexample

MaxResults

integer

No

The number of entries per page for paging.

20

Response elements

Element

Type

Description

Example

object

The response.

RequestId

string

The request ID.

0441BD79-92F3-53AA-8657-F8CE4A2B912A

TotalCount

integer

The total number of entries.

100

Users

array<object>

The list of accounts.

object

The account information.

UserId

string

The account ID.

user_d6sbsuumeta4h66ec3il7yxxxx

Username

string

The username.

name001

DisplayName

string

The display name.

display_name001

PasswordSet

boolean

Indicates whether the password is set.

false

PhoneRegion

string

The region code of the mobile phone number. Example: 86 for the Chinese mainland, without 00 or +.

86

PhoneNumber

string

The phone number.

156xxxxxxx

PhoneNumberVerified

boolean

Indicates whether the phone number is verified. A value of true indicates that the phone number has been verified by the user or set as verified by the administrator. A value of false indicates that the phone number is not verified.

true

Email

string

The email address of the account.

user@example.com

EmailVerified

boolean

Indicates whether the email address is verified. A value of true indicates that the email address has been verified by the user or set as verified by the administrator. A value of false indicates that the email address is not verified.

true

UserExternalId

string

The external ID of the account. This ID is used to map external data to IDaaS accounts. The default value is the IDaaS account ID.

Note: The external ID must be unique within the same source type and source ID.

user_d6sbsuumeta4h66ec3il7yxxxx

UserSourceType

string

The source type of the account. Valid values:

  • build_in: The account is self-managed.

  • ding_talk: The account is imported from DingTalk.

  • ad: The account is imported from AD.

  • ldap: The account is imported from LDAP.

build_in

UserSourceId

string

The source ID of the account.

For the built-in type, the default value is the instance ID. For other types, the value corresponds to the enterprise ID of the source. For example, the DingTalk source corresponds to the corpId of the DingTalk enterprise.

idaas_ue2jvisn35ea5lmthk267xxxxx

Status

string

The status of the account. Valid values:

  • enabled: The account is enabled.

  • disabled: The account is disabled.

enabled

AccountExpireTime

integer

The expiration time of the account. The value is a UNIX timestamp in milliseconds.

1652085686179

PasswordExpireTime

integer

The expiration time of the password. The value is a UNIX timestamp in milliseconds.

1652085686179

RegisterTime

integer

The registration time of the account. The value is a UNIX timestamp in milliseconds.

1652085686179

LockExpireTime

integer

The expiration time of the account lock. The value is a UNIX timestamp in milliseconds.

1652085686179

CreateTime

integer

The creation time of the account. The value is a UNIX timestamp in milliseconds.

1652085686179

UpdateTime

integer

The last update time of the account. The value is a UNIX timestamp in milliseconds.

1652085686179

Description

string

The description of the account.

Test account

InstanceId

string

The instance ID.

idaas_ue2jvisn35ea5lmthk267xxxxx

NextToken

string

The query token.

NTxxxxxexample

MaxResults

integer

The maximum number of entries per page for a paged query.

20

Examples

Success response

JSON format

{
  "RequestId": "0441BD79-92F3-53AA-8657-F8CE4A2B912A",
  "TotalCount": 100,
  "Users": [
    {
      "UserId": "user_d6sbsuumeta4h66ec3il7yxxxx",
      "Username": "name001",
      "DisplayName": "display_name001",
      "PasswordSet": false,
      "PhoneRegion": "86",
      "PhoneNumber": "156xxxxxxx",
      "PhoneNumberVerified": true,
      "Email": "user@example.com",
      "EmailVerified": true,
      "UserExternalId": "user_d6sbsuumeta4h66ec3il7yxxxx",
      "UserSourceType": "build_in",
      "UserSourceId": "idaas_ue2jvisn35ea5lmthk267xxxxx",
      "Status": "enabled",
      "AccountExpireTime": 1652085686179,
      "PasswordExpireTime": 1652085686179,
      "RegisterTime": 1652085686179,
      "LockExpireTime": 1652085686179,
      "CreateTime": 1652085686179,
      "UpdateTime": 1652085686179,
      "Description": "xxxx",
      "InstanceId": "idaas_ue2jvisn35ea5lmthk267xxxxx"
    }
  ],
  "NextToken": "NTxxxxxexample",
  "MaxResults": 20
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.