All Products
Search
Document Center

CloudSSO:ListUsers

Last Updated:Aug 12, 2026

Queries a list of users.

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

cloudsso:ListUsers

list

*User

acs:cloudsso:{#regionId}:{#accountId}:directory/{#DirectoryId}/user/*

None None

Request parameters

Parameter

Type

Required

Description

Example

DirectoryId

string

Yes

The directory ID.

d-00fc2p61****

Status

string

No

The user status. This parameter is used as a filter condition. Valid values:

  • Enabled: The user is enabled.

  • Disabled: The user is disabled.

Enabled

ProvisionType

string

No

The user type. This parameter is used as a filter condition. Valid values:

  • Manual: The user is manually created.

  • Synchronized: The user is synchronized from an external identity provider.

Manual

Filter

string

No

The filter condition.

Format: <Attribute> <Operator> <Value>. This value is case-insensitive. Currently, <Attribute> supports only UserName, and Operator supports only eq (Equals) and sw (Start With).

Example: Filter = "UserName sw test" queries all users whose usernames start with test. Filter = "UserName eq testuser" queries the user whose username is testuser.

UserName sw test

MaxResults

integer

No

The maximum number of entries per page.

Valid values: 1 to 100.

Default value: 10.

10

NextToken

string

No

The token for the next page of results. You do not need to specify NextToken for the first API call.

When you call the API for the first time, if the total number of entries exceeds the MaxResults limit, the data is truncated and only MaxResults entries are returned. In this case, the response parameter IsTruncated is true and a NextToken is returned. You can use the NextToken returned from the previous call to continue calling the API while keeping other request parameters unchanged to query the truncated data. You can repeat this process until IsTruncated is false, which indicates that all data has been retrieved.

K1c3o9K7pFxoTtxH1Nm7MMLb7zrDGvftYBQBPDVv7AD3a8yhRb3Mk8L9ivmN6bFSjfkZNTAg3h4****

Tags

array<object>

No

The tag list.

object

No

Key

string

No

The tag key.

TestKey

Value

string

No

The tag value.

TestValue

Response elements

Element

Type

Description

Example

object

The response parameters.

NextToken

string

The token for the next page of results.

Note

This parameter is returned only when IsTruncated is true.

K1c3o9K7pFxoTtxH1Nm7MMLb7zrDGvftYBQBPDVv7AD3a8yhRb3Mk8L9ivmN6bFSjfkZNTAg3h4****

RequestId

string

The request ID.

734D9AAC-9A8E-5DF6-A633-ADE70FF2A9B1

MaxResults

integer

The maximum number of entries per page.

10

TotalCounts

integer

The total number of entries that match the request parameters.

2

IsTruncated

boolean

Indicates whether the results are truncated. Valid values:

  • true: The results are truncated.

  • false: The results are not truncated.

false

Users

array<object>

The user list.

array<object>

The user list.

Status

string

The status of the user. Valid values:

  • Enabled: The user is enabled.

  • Disabled: The user is disabled.

Enabled

UserName

string

The username.

AliceLee@example.onmicrosoft.com

Email

string

The email address of the user.

AliceLee@example.onmicrosoft.com

Description

string

The description of the user.

This is a user.

UserId

string

The user ID.

u-00bikzkuzbb58luh****

FirstName

string

The first name of the user.

Alice

CreateTime

string

The time when the user was created (UTC).

2021-06-30T09:20:08Z

ProvisionType

string

The type of the user. Valid values:

  • Manual: The user is manually created.

  • Synchronized: The user is synchronized from an external identity provider.

Synchronized

DisplayName

string

The display name of the user.

AliceLee

UpdateTime

string

The time when the user was last modified (UTC).

2021-06-30T09:20:08Z

LastName

string

The last name of the user.

Lee

ExternalId

object

The identifier information of the user from the external identity provider.

Id

string

The identifier of the user in the external IdP.

c73******a5fdd5

Issuer

string

The channel for external user synchronization. Currently, only SCIM synchronization is supported.

SCIM

Tags

array<object>

The tag list.

object

Key

string

The tag key.

TestKey

Value

string

The tag value.

TestValue

Examples

Success response

JSON format

{
  "NextToken": "K1c3o9K7pFxoTtxH1Nm7MMLb7zrDGvftYBQBPDVv7AD3a8yhRb3Mk8L9ivmN6bFSjfkZNTAg3h4****",
  "RequestId": "734D9AAC-9A8E-5DF6-A633-ADE70FF2A9B1",
  "MaxResults": 10,
  "TotalCounts": 2,
  "IsTruncated": false,
  "Users": [
    {
      "Status": "Enabled",
      "UserName": "AliceLee@example.onmicrosoft.com",
      "Email": "AliceLee@example.onmicrosoft.com",
      "Description": "This is a user.",
      "UserId": "u-00bikzkuzbb58luh****",
      "FirstName": "Alice",
      "CreateTime": "2021-06-30T09:20:08Z",
      "ProvisionType": "Synchronized",
      "DisplayName": "AliceLee",
      "UpdateTime": "2021-06-30T09:20:08Z",
      "LastName": "Lee",
      "ExternalId": {
        "Id": "c73******a5fdd5\n",
        "Issuer": "SCIM"
      },
      "Tags": [
        {
          "Key": "TestKey",
          "Value": "TestValue"
        }
      ]
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.