square-napkin-92357
05/05/2025, 8:00 AMbrief-egg-61061
05/05/2025, 8:00 AMbrief-egg-61061
05/05/2025, 8:00 AM/admin/identities
endpoint in Ory Kratos, you need to add a query parameter to filter by state. Based on the knowledge sources, you can filter identities by their state using the following approach: Currently, your API call is using pagination parameters (page_size
and page_token
), but it doesn't include any filtering for the identity state. According to the documentation, identities can have two states: - active
- The identity can use self-service flows such as sign-in - inactive
- The identity can't use self-service flows Unfortunately, the API reference for the listIdentities
endpoint doesn't explicitly show a parameter for filtering by state in the provided knowledge sources. However, based on the identity state documentation, you can use the identity state to determine whether an identity is active or not. You would need to retrieve all identities and then filter them on your side based on the state
property in each identity object. Each identity in the response will have a state
field that is either "active" or "inactive". For reference, the identity state information is documented here: [Identity state](https://www.ory.sh/docs/identities/model/activate-deactivate-user-login-state) If you need to change the state of identities, you can use the SDK as shown in the documentation to activate or deactivate identities.