You can call this operation to query user information corresponding to AD directories.

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer automatically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListDirectoryUsers

The operation that you want to perform. Set the value to ListDirectoryUsers.

RegionId String Yes cn-hangzhou

The ID of the region.

DirectoryId String Yes cn-hangzhou+dir-jedbpr4sl9l37****

The ID of the AD directory.

MaxResults Integer No 10

The number of entries to return on each page.

Valid values: 1 to 100.

Default value: 10.

NextToken String No caeba0bbb2be03f84eb48b699f0a4883

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

Response parameters

Parameter Type Example Description
NextToken String caeba0bbb2be03f84eb48b699f0a4883

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

RequestId String 269BDB16-2CD8-4865-84BD-11C40BC21DB0

The ID of the request.

Users Array of User

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

EndUser String testEndUser

The name of the user.

Examples

Sample requests

https://ecd.cn-hangzhou.aliyuncs.com/?Action=ListDirectoryUsers
&DirectoryId=cn-hangzhou+dir-jedbpr4sl9l37****
&MaxResults=10
&<Common request parameters>

Sample success responses

XML format

<ListDirectoryUsersResponse>
      <RequestId>269BDB16-2CD8-4865-84BD-11C40BC21DB0</RequestId>
      <NextToken>caeba0bbb2be03f84eb48b699f0a4883</NextToken>
      <Users>
            <EndUser>testEndUser</EndUser>
      </Users>
</ListDirectoryUsersResponse>

JSON format

{
    "RequestId":"269BDB16-2CD8-4865-84BD-11C40BC21DB0",
    "NextToken":"caeba0bbb2be03f84eb48b699f0a4883",
    "Users":[
        {
            "EndUser":"testEndUser"
        }
    ]
}

Error codes

For a list of error codes, visit the API Error Center.