Get organizations for a user

GET /api/users/{userId}/organizations

Get all organizations that the user is a member of. In each organization object, the user's roles in that organization are included in the organizationRoles array.

Path parameters

  • userId string Required

    The unique identifier of the user.

Responses

  • 200 application/json

    An array of organizations that the user is a member of.

    Hide response attributes Show response attributes object
  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

GET /api/users/{userId}/organizations
curl \
 -X GET https://[tenant_id].logto.app/api/users/{userId}/organizations \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
[
  {
    "tenantId": "string",
    "id": "string",
    "name": "string",
    "description": "string",
    "customData": {},
    "isMfaRequired": true,
    "branding": {
      "logoUrl": "string",
      "darkLogoUrl": "string",
      "favicon": "string",
      "darkFavicon": "string"
    },
    "createdAt": 42.0,
    "organizationRoles": [
      {
        "id": "string",
        "name": "string"
      }
    ]
  }
]