AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

The response from the request to list users.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceResponse
    Amazon.CognitoIdentityProvider.Model.ListUsersResponse

Namespace: Amazon.CognitoIdentityProvider.Model
Assembly: AWSSDK.CognitoIdentityProvider.dll
Version: 3.x.y.z

Syntax

C#
public class ListUsersResponse : AmazonWebServiceResponse

The ListUsersResponse type exposes the following members

Constructors

NameDescription
Public Method ListUsersResponse()

Properties

NameTypeDescription
Public Property ContentLength System.Int64 Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property HttpStatusCode System.Net.HttpStatusCode Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property PaginationToken System.String

Gets and sets the property PaginationToken.

The identifier that Amazon Cognito returned with the previous request to this operation. When you include a pagination token in your request, Amazon Cognito returns the next set of items in the list. By use of this token, you can paginate through the full list of items.

Public Property ResponseMetadata Amazon.Runtime.ResponseMetadata Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property Users System.Collections.Generic.List<Amazon.CognitoIdentityProvider.Model.UserType>

Gets and sets the property Users.

A list of the user pool users, and their attributes, that match your query.

Amazon Cognito creates a profile in your user pool for each native user in your user pool, and each unique user ID from your third-party identity providers (IdPs). When you link users with the AdminLinkProviderForUser API operation, the output of ListUsers displays both the IdP user and the native user that you linked. You can identify IdP users in the Users object of this API response by the IdP prefix that Amazon Cognito appends to Username.

Examples

This request submits a value for all possible parameters for ListUsers. By iterating the PaginationToken, you can page through and collect all users in a user pool.

A ListUsers request for the next 3 users whose email address starts with "testuser."


var client = new AmazonCognitoIdentityProviderClient();
var response = client.ListUsers(new ListUsersRequest 
{
    AttributesToGet = new List<string> {
        "email",
        "sub"
    },
    Filter = "\"email\"^=\"testuser\"",
    Limit = 3,
    PaginationToken = "abcd1234EXAMPLE",
    UserPoolId = "us-east-1_EXAMPLE"
});

string paginationToken = response.PaginationToken;
List<UserType> users = response.Users;

            

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5, 4.0, 3.5