Skip to content
Esc
navigateopen⌘Jpreview
Dashboard

List tenants in an app

Get a list of all tenants in an app.

The value of firstFactors can be as follows:

  • null: When set to null, the SDK will use firstFactors defined in the SDK
  • [] (empty array): No first factors would be enabled for the tenant
  • non-empty array: The first factors that are enabled for the tenant

Request must originate from public tenant.

GET/appid-{appId}/recipe/multitenancy/tenant/list/v2
Authorization
api-keyAPI key · headerrequired
The core service API token. If you are using a self-hosted core service and you have not generated a token, you can omit the header.
Header parameters
ridstring
cdi-versionstring
X.Y of the X.Y.Z CDI version.
Responses
200List of tenants
statusstatusOKrequired
Allowed:OK
tenantstenantConfigV2[]required
Show properties
Array of tenantConfigV2
tenantIdtenantIdrequired
thirdPartyobjectrequired
Show properties
providersthirdPartyProviderConfig[]
Show properties
Array of thirdPartyProviderConfig
thirdPartyIdstringrequired
namestring
clientsobject[]
Show properties
Array of object
clientTypestring
clientIdstring
clientSecretstring
scopestring[]
forcePKCEboolean
additionalConfigobject
authorizationEndpointstring
authorizationEndpointQueryParamsobject
tokenEndpointstring
tokenEndpointBodyParamsobject
userInfoEndpointstring
userInfoEndpointQueryParamsobject
userInfoEndpointHeadersobject
jwksURIstring
oidcDiscoveryEndpointstring
requireEmailboolean
default: true
userInfoMapobject
Show properties
fromIdTokenPayloadobject
Show properties
userIdstring
emailstring
emailVerifiedstring
fromUserInfoAPIobject
Show properties
userIdstring
emailstring
emailVerifiedstring
firstFactorsfirstFactors
requiredSecondaryFactorsrequiredSecondaryFactors
coreConfigobjectrequired
400error code 400
string
401error code 401
string
404error code 404
string
500error code 500
string
Try it
Server
Authorization
Parameters
Request
curl -X GET "/appid-{appId}/recipe/multitenancy/tenant/list/v2" \
  -H "api-key: YOUR_API_KEY"
Response
{
  "status": "OK",
  "tenants": [
    {
      "tenantId": "customer1",
      "thirdParty": {
        "providers": [
          {
            "thirdPartyId": "string",
            "name": "string",
            "clients": [
              {
                "clientType": "string",
                "clientId": "string",
                "clientSecret": "string",
                "scope": [
                  "string"
                ],
                "forcePKCE": true,
                "additionalConfig": {}
              }
            ],
            "authorizationEndpoint": "string",
            "authorizationEndpointQueryParams": {},
            "tokenEndpoint": "string",
            "tokenEndpointBodyParams": {},
            "userInfoEndpoint": "string",
            "userInfoEndpointQueryParams": {},
            "userInfoEndpointHeaders": {},
            "jwksURI": "string",
            "oidcDiscoveryEndpoint": "string",
            "requireEmail": true,
            "userInfoMap": {
              "fromIdTokenPayload": {
                "userId": "string",
                "email": "string",
                "emailVerified": "string"
              },
              "fromUserInfoAPI": {
                "userId": "string",
                "email": "string",
                "emailVerified": "string"
              }
            }
          }
        ]
      },
      "firstFactors": [
        "emailpassword"
      ],
      "requiredSecondaryFactors": [
        "otp-phone"
      ],
      "coreConfig": {}
    }
  ]
}

API reference

API schema and response details