FilterUsers

Updated at:

Queries convenience account information filtered by user property.

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

ecd:FilterUsers

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

MaxResults

integer

No

The number of entries to return per page. If the value is greater than 100, it is automatically reset to 100.

10

NextToken

string

No

The token for the next query. You do not need to specify this parameter for the first call. If the response does not contain all results, the returned NextToken is not empty. You can use the returned NextToken in subsequent queries to retrieve the remaining results.

caeba0bbb2be03f84eb48b699f0a****

Filter

string

No

The fuzzy search string. This parameter supports matching the username (EndUserId) and email address (Email). Wildcards (*) are supported. For example, if you set this parameter to a*m, all results where the username or email address starts with a and ends with m are returned.

a*m

PropertyFilterParam

array<object>

No

The list of user attributes to use for fuzzy search.

object

No

The user attribute to use for fuzzy search.

PropertyId

integer

No

The ID of the attribute.

328

PropertyValueIds

string

No

The IDs of the attribute values.

1255

PropertyKeyValueFilterParam

array<object>

No

The list of attribute names and attribute values.

object

No

The attribute name and attribute value.

PropertyKey

string

No

The name of the attribute.

job

PropertyValues

string

No

The values of the attribute.

dev

IncludeDesktopCount

boolean

No

Specifies whether to return the number of cloud desktops assigned to the user.

Valid values:

  • false :

    Do not return the number of assigned cloud desktops.

  • true :

    Returns the number of assigned cloud desktops.

true

IncludeDesktopGroupCount

boolean

No

Specifies whether to return the number of cloud desktop pools assigned to the user.

Valid values:

  • false :

    Do not return the number of assigned cloud desktop pools.

  • true :

    Returns the number of assigned cloud desktop pools.

false

OrgId

string

No

The ID of the enterprise organization.

org-aliyun-wy-org-id

OwnerType

string

No

The account activation type.

Valid values:

  • CreateFromManager :

    Activated by administrator.

  • Normal :

    Activated by user.

Normal

IncludeEndUserIds

array

No

The list of convenience account usernames to include in the query results.

string

No

The convenience account username to include in the query results.

alice

ExcludeEndUserIds

array

No

The list of usernames (EndUserIds) to exclude by exact match.

string

No

The username (EndUserId) to exclude by exact match. Users with this username are excluded from the query results.

tony

OrderParam

object

No

The supported sorting parameters.

OrderField

string

No

The field by which to sort the results.

Valid values:

  • EndUserId :

    Username.

  • id :

    User primary key ID.

  • gmt_created :

    Creation time.

id

OrderType

string

No

The sort order.

Valid values:

  • ASC :

    Ascending order.

  • DESC :

    Descending order [default value].

DESC

Status

integer

No

The status used to filter users.

Valid values:

  • 0 :

    Normal.

  • 11 :

    Resigned.

0

IsQueryAllSubOrgs

boolean

No

Specifies whether to query all sub-organizations.

IncludeOrgInfo

boolean

No

Specifies whether to include organization information.

IncludeSupportIdps

boolean

No

Specifies whether to include the supported logon types.

BusinessChannel

string

No

The channel.

ENTERPRISE

FilterMap

object

No

The mapping of fuzzy match conditions for user information. This parameter supports fields such as username, description, phone number, email address, nickname, and employee ID.

{"nameFilter":"alice"}

string

No

The fuzzy match text for the corresponding filter field.

alice

ShowExtras

object

No

The mapping of switches for additional return information. This parameter controls whether to display desktop policy information.

{"resourcePolicy":"true"}

string

No

Specifies whether to display the corresponding additional information.

true

Response elements

Element

Type

Description

Example

object

The response information.

RequestId

string

The request ID.

1CBAFFAB-B697-4049-A9B1-67E1FC5F****

NextToken

string

The token for the next query. If a query does not return all results, the returned NextToken is not empty. You can pass the returned NextToken in the next query to continue querying.

caeba0bbb2be03f84eb48b699f0a****

Users

array<object>

The collection of convenience user information.

array<object>

The convenience user information.

Id

integer

The user ID.

4205**

EndUserId

string

The username.

alice

Email

string

The email address.

username@example.com

Phone

string

The mobile phone number.

1381111****

Status

integer

The status of the convenience user.

Valid values:

  • 0 :

    Normal.

  • 9 :

    Locked.

  • 11 :

    Resigned.

0

UserSetPropertiesModels

array<object>

The collection of user properties.

array<object>

The user property.

UserId

integer

The ID of the user to which the property is bound.

4205**

UserName

string

The username of the user to which the property is bound.

alice

PropertyId

integer

The user property ID.

12

PropertyKey

string

The user property name.

department

PropertyType

integer

The user property number.

2

PropertyValues

array<object>

The user property value.

object

The user property value.

PropertyValueId

integer

The user property value ID.

42

PropertyValue

string

The user property value.

dev

DesktopCount

integer

The number of cloud desktops assigned to the user.

1

ExternalInfo

object

The extended user information.

ExternalName

string

The name of the account associated with the user.

account

JobNumber

string

The account, student ID, or employee ID associated with the user.

030801

DesktopGroupCount

integer

The number of cloud desktop pools authorized for the user. This value is returned when IncludeDesktopGroupCount is set to true.

2

OwnerType

string

The ownership type of the account.

Valid values:

  • CreateFromManager :

    Activated by administrator.

  • Normal :

    Activated by user.

Normal

Remark

string

The remarks for the user.

For testing only

IsTenantManager

boolean

Indicates whether the user is a tenant administrator.

Valid values:

  • false :

    No.

  • true :

    Yes.

true

EnableAdminAccess

boolean

Indicates whether the user is a local administrator.

Valid values:

  • false :

    No.

  • true :

    Yes.

true

RealNickName

string

The user nickname.

John

AutoLockTime

string

The date when the account is automatically locked, in the YYYY-MM-DD format.

2023-03-03

PasswordExpireDays

integer

The password of the user account is valid permanently by default. You can use this parameter to set a password validity period of 30 to 365 days. After the password expires, the end user must change the password before logging on again.

Note

This feature is in invitational preview. To use this feature, submit a ticket to apply for activation.

30

PasswordExpireRestDays

integer

The remaining days of the password validity period for the account.

10

OrgList

array<object>

The list of organizations to which the user belongs.

object

The list of organizations to which the user belongs.

OrgId

string

The organization structure ID.

org-1mox****

OrgName

string

The organization structure name.

Design Department

OrgNamePath

string

The organization structure name path.

Product Department/Design Department

SupportLoginIdps

array<object>

The supported identity sources for logon.

object

The supported identity sources for logon.

IdpId

string

The enterprise identity source ID.

idp-hlyexfvwert9m8****

IdpName

string

The enterprise identity source name.

DingTalk

UserSource

string

The enterprise identity source type for the user source. The backend determines whether to query this field based on the display and hide configurations of the custom columns for the enterprise identity source. Valid values: DINGDING (DingTalk), FEISHU (Lark), WECHAT (WeCom), and ENTRA_ID (Microsoft Entra ID). This field is empty when the column is hidden, not configured, or not associated with an enterprise identity source.

FEISHU

Groups

array<object>

The list of user groups to which the convenience user belongs.

object

The user group to which the convenience user belongs.

GroupId

string

The user group ID.

ug-2412ojkwtybd****

GroupName

string

The user group name.

TestGroup

ResourcePolicyList

array<object>

The list of resource policies associated with the convenience user.

object

The resource policy associated with the convenience user.

PolicyId

string

The resource policy ID.

policy-example

PolicyName

string

The resource policy name.

示例资源策略

Examples

Success response

JSON format

{
  "RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****",
  "NextToken": "caeba0bbb2be03f84eb48b699f0a****",
  "Users": [
    {
      "Id": 0,
      "EndUserId": "alice",
      "Email": "username@example.com",
      "Phone": "1381111****",
      "Status": 0,
      "UserSetPropertiesModels": [
        {
          "UserId": 0,
          "UserName": "alice",
          "PropertyId": 12,
          "PropertyKey": "department",
          "PropertyType": 2,
          "PropertyValues": [
            {
              "PropertyValueId": 42,
              "PropertyValue": "dev"
            }
          ]
        }
      ],
      "DesktopCount": 1,
      "ExternalInfo": {
        "ExternalName": "account",
        "JobNumber": "030801"
      },
      "DesktopGroupCount": 2,
      "OwnerType": "Normal",
      "Remark": "For testing only",
      "IsTenantManager": true,
      "EnableAdminAccess": true,
      "RealNickName": "Xiaoming",
      "AutoLockTime": "2023-03-03",
      "PasswordExpireDays": 30,
      "PasswordExpireRestDays": 10,
      "OrgList": [
        {
          "OrgId": "org-1mox****",
          "OrgName": "Design Department",
          "OrgNamePath": "Product Department/Design Department"
        }
      ],
      "SupportLoginIdps": [
        {
          "IdpId": "idp-hlyexfvwert9m8****",
          "IdpName": "DingTalk"
        }
      ],
      "UserSource": "FEISHU",
      "Groups": [
        {
          "GroupId": "ug-2412ojkwtybd****",
          "GroupName": "TestGroup"
        }
      ],
      "ResourcePolicyList": [
        {
          "PolicyId": "policy-example",
          "PolicyName": "示例资源策略"
        }
      ]
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.