Get users with filters and pagination.
Logto provides a very flexible way to query users. You can filter users by almost any fields with multiple modes. To learn more about the query syntax, please refer to Advanced user search.
Query parameters
-
Page number (starts from 1).
Minimum value is
1. Default value is1. -
Entries per page.
Minimum value is
1. Default value is20. -
Search query parameters.
-
The external identity type to use for an exact user lookup. Use
socialfor a social connector identity orssofor an enterprise SSO identity. Must be provided together withidentityProviderandidentityId. External identity filters are combined with other user filters using AND logic.Values are
socialorsso. -
The connector target for a social identity (for example,
dingtalk), or the issuer for an enterprise SSO identity. Must be provided together withidentityTypeandidentityId. -
The user identifier issued by the external identity provider, such as a DingTalk OpenID. Must be provided together with
identityTypeandidentityProvider.
curl \
--request GET 'https://[tenant_id].logto.app/api/users' \
--header "Authorization: Bearer $ACCESS_TOKEN"
[
{
"id": "string",
"username": "string",
"primaryEmail": "string",
"primaryPhone": "string",
"name": "string",
"avatar": "string",
"customData": {},
"identities": {
"additionalProperty1": {
"userId": "string",
"details": {}
},
"additionalProperty2": {
"userId": "string",
"details": {}
}
},
"lastSignInAt": 42.0,
"createdAt": 42.0,
"updatedAt": 42.0,
"profile": {
"familyName": "string",
"givenName": "string",
"middleName": "string",
"nickname": "string",
"preferredUsername": "string",
"profile": "string",
"website": "string",
"gender": "string",
"birthdate": "string",
"zoneinfo": "string",
"locale": "string",
"address": {
"formatted": "string",
"streetAddress": "string",
"locality": "string",
"region": "string",
"postalCode": "string",
"country": "string"
}
},
"applicationId": "string",
"cimdClientId": "string",
"isSuspended": true,
"hasPassword": true,
"hasSecurityVerificationMethod": true,
"ssoIdentities": [
{
"tenantId": "string",
"id": "string",
"userId": "string",
"issuer": "string",
"identityId": "string",
"detail": {},
"createdAt": 42.0,
"updatedAt": 42.0,
"ssoConnectorId": "string"
}
],
"passwordDigest": "string",
"passwordAlgorithm": "Argon2i"
}
]