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
    • id string Required

      Minimum length is 1, maximum length is 21.

    • name string Required

      Minimum length is 1, maximum length is 128.

    • description string | null Required

      Maximum length is 256.

    • customData object Required

      arbitrary

    • createdAt number Required
    • organizationRoles array[object] Required
      Hide organizationRoles attributes Show organizationRoles attributes object
  • 400

    Bad Request

  • 401

    Unauthorized

  • 403

    Forbidden

  • 404

    Not Found

GET /api/users/{userId}/organizations
curl \
 -X GET https://[tenant_id].logto.app/api/users/{userId}/organizations
Response examples (200)
[
  {
    "id": "string",
    "name": "string",
    "description": "string",
    "customData": {},
    "createdAt": 42.0,
    "organizationRoles": [
      {
        "id": "string",
        "name": "string"
      }
    ]
  }
]