Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

ListIdentities - Amazon Cognito Federated Identities

ListIdentities

Lists the identities in an identity pool.

Note

Amazon Cognito evaluates AWS Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy.

Request Syntax

{ "HideDisabled": boolean, "IdentityPoolId": "string", "MaxResults": number, "NextToken": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

HideDisabled

An optional boolean parameter that allows you to hide disabled identities. If omitted, the ListIdentities API will include disabled identities in the response.

Type: Boolean

Required: No

IdentityPoolId

An identity pool ID in the format REGION:GUID.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 55.

Pattern: [\w-]+:[0-9a-f-]+

Required: Yes

MaxResults

The maximum number of identities to return.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 60.

Required: Yes

NextToken

A pagination token.

Type: String

Length Constraints: Minimum length of 1.

Pattern: [\S]+

Required: No

Response Syntax

{ "Identities": [ { "CreationDate": number, "IdentityId": "string", "LastModifiedDate": number, "Logins": [ "string" ] } ], "IdentityPoolId": "string", "NextToken": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Identities

An object containing a set of identities and associated mappings.

Type: Array of IdentityDescription objects

IdentityPoolId

An identity pool ID in the format REGION:GUID.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 55.

Pattern: [\w-]+:[0-9a-f-]+

NextToken

A pagination token.

Type: String

Length Constraints: Minimum length of 1.

Pattern: [\S]+

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalErrorException

Thrown when the service encounters an error during processing the request.

HTTP Status Code: 500

InvalidParameterException

Thrown for missing or bad input parameter(s).

HTTP Status Code: 400

NotAuthorizedException

Thrown when a user is not authorized to access the requested resource.

HTTP Status Code: 400

ResourceNotFoundException

Thrown when the requested resource (for example, a dataset or record) does not exist.

HTTP Status Code: 400

TooManyRequestsException

Thrown when a request is throttled.

HTTP Status Code: 400

Examples

ListIdentities

The following examples show a request and a response for the ListIdentities action. The request and response bodies have been formatted for readability and may not match the content-length value.

Sample Request

POST / HTTP/1.1 CONTENT-TYPE: application/json CONTENT-LENGTH: 234 X-AMZ-TARGET: com.amazonaws.cognito.identity.model.AWSCognitoIdentityService.ListIdentities HOST: <endpoint> X-AMZ-DATE: 20140805T162253Z AUTHORIZATION: AWS4-HMAC-SHA256 Credential=<credential>, SignedHeaders=content-type;content-length;host;x-amz-date;x-amz-target, Signature=<signature> { "IdentityPoolId": "us-east-1:509f9747-5b5d-484e-a2d7-74fcba108147", "MaxResults": 10 }

Sample Response

1.1 200 OK x-amzn-requestid: 75dbdfc0-29a2-4177-98e5-602c8f2c21eb date: Tue, 05 Aug 2014 16:22:54 GMT content-type: application/json content-length: 353 { "Identities": [ { "IdentityId": "us-east-1:1eeb6443-3fbc-4d3f-a96c-28ff0EXAMPLE", "Logins": null }, { "IdentityId": "us-east-1:6820d0d3-3c95-4d9f-8813-c4448EXAMPLE", "Logins": null }], "IdentityPoolId": "us-east-1:509f9747-5b5d-484e-a2d7-74fcbEXAMPLE", "NextToken": null }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.