Unlock the Power of AI

1 million free tokens

88% Price Reduction

NaNDayNaN:NaN:NaN
Activate Now

ListDirectoryUsers

Updated at: 2025-03-13 05:39

Obtains the user information in the AD system if you use an AD directory to connect to an AD system.

Operation description

If you use an AD directory to connect to an AD system, you can call this operation to obtain the user information in the AD system.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
OperationAccess levelResource typeCondition keyAssociated operation
ecd:ListDirectoryUsersget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
FilterstringNo

The query string for fuzzy match. If you specify this parameter, the system returns all results that contain the string.

alice
DirectoryIdstringYes

The ID of the AD directory.

cn-hangzhou+dir-jedbpr4sl9l37****
NextTokenstringNo

The token used to start the next query. If the value of this parameter is empty, all results are returned.

caeba0bbb2be03f84eb48b699f0a4883
MaxResultsintegerNo

The number of entries to return on each page.

Valid values: 1 to 100.

Default value: 10.

10
OUPathstringNo

The organizational unit (OU) in the specified AD domain.

example.com/Domain Controllers
AssignedInfostringNo
Note
This parameter is not publicly available. The value can be 1 or left empty.
1
SortTypestringNo

The sort type.

Valide values:

  • asc: cloud computers assigned to users on bottom
  • desc: cloud computers assigned to users on top
asc
IncludeAssignedUserbooleanNo

Specifies whether to return the users with assigned cloud computers only.

true

Response parameters

ParameterTypeDescriptionExample
ParameterTypeDescriptionExample
object

The response parameters.

NextTokenstring

The token used to start the next query. If the value of this parameter is empty, all results are returned.

caeba0bbb2be03f84eb48b699f0a4883
RequestIdstring

The ID of the request.

1CBAFFAB-B697-4049-A9B1-67E1FC5F****
Usersarray<object>

The names of users corresponding to the AD directory. If the AD directory contains only Administrator and Guest, an empty Users array is returned.

Userobject
EndUserstring

The name of the user.

Alice
DisplayNamestring

The display name of the user.

Alice
AssignedDesktopNumberinteger

The number of assigned cloud computers.

2
Emailstring

The email address.

user@example.com
Phonestring

The mobile number.

130********

Examples

Sample success responses

JSONformat

{
  "NextToken": "caeba0bbb2be03f84eb48b699f0a4883",
  "RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****",
  "Users": [
    {
      "EndUser": "Alice",
      "DisplayName": "Alice",
      "AssignedDesktopNumber": 2,
      "Email": "user@example.com",
      "Phone": "130********"
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
Change timeSummary of changesOperation
2024-09-06The request parameters of the API has changed. The response structure of the API has changedView Change Details
2021-08-19The request parameters of the API has changedView Change Details
2021-08-19The response structure of the API has changedView Change Details
  • On this page (0)
  • Operation description
  • Debugging
  • Authorization information
  • Request parameters
  • Response parameters
  • Examples
  • Error codes
  • Change history
Feedback
phone Contact Us

Chat now with Alibaba Cloud Customer Service to assist you in finding the right products and services to meet your needs.

alicare alicarealicarealicare