square-napkin-92357
06/24/2025, 3:50 AMbrief-egg-61061
06/24/2025, 3:50 AMbrief-egg-61061
06/24/2025, 3:50 AMGET /admin/identities?credentials_identifier=username1 GET /admin/identities?credentials_identifier=username2 ...
Alternatively, if you already have the IDs of the identities, you can use the ids query parameter to retrieve multiple identities in a single request: GET /admin/identities?ids=id1&id2&id3
But there is no built-in way to search for multiple usernames in a single API call. You would need to loop through your list of usernames and make individual requests for each one, or first fetch all identities and filter them client-side. Here are the relevant parameters from the API: - credentials_identifier: The identifier (username, email) of the credentials to look up using exact match. Only one value can be used per request. - ids: Retrieve multiple identities by their IDs (not usernames) in a single request. This does not support searching by username directly. Reference: [Ory API Reference – listIdentities parameters](https://raw.githubusercontent.com/ory/docs/master/docs/reference/api.json)square-napkin-92357
06/24/2025, 3:55 AMbrief-egg-61061
06/24/2025, 3:56 AMbrief-egg-61061
06/24/2025, 3:56 AMGET /admin/identities?preview_credentials_identifier_similar=partial_username
This will return identities whose credentials identifiers (e.g., usernames or emails) partially match the string you provide. Caution: Since this is an experimental feature, do not rely on it for production-critical workflows, as it may change or be removed at any time without notice. For more details, see the API documentation: > preview_credentials_identifier_similar: This is an EXPERIMENTAL parameter that WILL CHANGE. Do NOT rely on consistent, deterministic behavior. THIS PARAMETER WILL BE REMOVED IN AN UPCOMING RELEASE WITHOUT ANY MIGRATION PATH. CredentialsIdentifierSimilar is the (partial) identifier (username, email) of the credentials to look up using similarity search. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used. [Ory API Reference – listIdentities parameters](https://raw.githubusercontent.com/ory/docs/master/docs/reference/api.json)