Queries users.
Operation description
This topic provides an example on how to query users in the d-00fc2p61****
directory. The returned result shows that the directory contains two users. The user AliceLee
is synchronized from an external identity provider (IdP). The user user1
is manually created within CloudSSO.
Debugging
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:
- The required resource types are displayed in bold characters.
- 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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
cloudsso:ListUsers | List |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DirectoryId | string | Yes | The ID of the resource directory. | d-00fc2p61**** |
Status | string | No | The status of the user. The parameter can be used to filter users. Valid values:
| Enabled |
ProvisionType | string | No | The type of the user. The parameter can be used to filter users. Valid values:
| Manual |
Filter | string | No | The filter condition. You must specify the value in the For example, if you set the Filter parameter to UserName sw test, the operation queries the users whose names start with test. If you set the Filter parameter to UserName eq testuser, the operation queries the user whose name is | UserName sw test |
MaxResults | integer | No | The number of entries per page. Valid values: 1 to 100. Default value: 10. | 10 |
NextToken | string | No | The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of the When you call this operation for the first time, if the total number of entries to return is larger than the value of the | K1c3o9K7pFxoTtxH1Nm7MMLb7zrDGvftYBQBPDVv7AD3a8yhRb3Mk8L9ivmN6bFSjfkZNTAg3h4**** |
Response parameters
Examples
Sample success responses
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"
}
}
]
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||
---|---|---|---|---|
2024-03-29 | The response structure of the API has changed | see changesets | ||
|