Ory Kratos does not currently support filtering identities by user ID in the list identities API. The official documentation and a related GitHub issue confirm that while you can list all identities, there is no built-in way to filter or batch query by a set of identity IDs using the list endpoint. The recommended workaround is to fetch each identity individually by its ID, potentially in parallel, but this is not optimal for large numbers of identities. There is community interest in adding this feature, but as of now, it is not available in the API or CLI commands [Retrieve subset of identities through admin API](
https://github.com/ory/network/issues/305).