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
  • 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": {},
    "isMfaRequired": true,
    "createdAt": 42.0,
    "organizationRoles": [
      {
        "id": "string",
        "name": "string"
      }
    ]
  }
]