Get role users

GET /api/roles/{id}/users

Get users who have the role assigned with pagination.

Path parameters

  • id string Required

    The unique identifier of the role.

Query parameters

  • page integer

    Page number (starts from 1).

    Minimum value is 1. Default value is 1.

  • page_size integer

    Entries per page.

    Minimum value is 1. Default value is 20.

  • Search query parameters.

    Hide search_params attributes Show search_params attributes object

Responses

GET /api/roles/{id}/users
curl \
 -X GET https://[tenant_id].logto.app/api/roles/{id}/users \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
[
  {
    "id": "string",
    "username": "string",
    "primaryEmail": "string",
    "primaryPhone": "string",
    "name": "string",
    "avatar": "string",
    "customData": {},
    "identities": {
      "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",
    "isSuspended": true,
    "hasPassword": true,
    "ssoIdentities": [
      {
        "tenantId": "string",
        "id": "string",
        "userId": "string",
        "issuer": "string",
        "identityId": "string",
        "detail": {},
        "createdAt": 42.0,
        "ssoConnectorId": "string"
      }
    ]
  }
]