Skip to main content
Paid Feature

This is a paid feature.

For self hosted users, Sign up to get a license key and follow the instructions sent to you by email. Creation of tenants is free on the dev license key.

This feature is already enabled for managed service users. Creation of additional tenant is free on the provided development environment.

Listing all tenants and apps

List all tenants for an app#

import Multitenancy from "supertokens-node/recipe/multitenancy";

async function listAllTenants() {

let resp = await Multitenancy.listAllTenants();
let tenants = resp.tenants;

tenants.forEach(tenant => {
let coreConfig = tenant.coreConfig;

let isEmailPasswordLoginEnabled = tenant.emailPassword.enabled;
let isThirdPartyLoginEnabled = tenant.thirdParty.enabled;
let isPasswordlessLoginEnabled = tenant.passwordless.enabled;

let configuredThirdPartyProviders = tenant.thirdParty.providers;
});
}

List all apps in a SuperTokens core#

This can only be done via a cURL command. There is no helper function for this in our backend SDKs since our backend SDKs are per app anyway.

curl --location --request GET '/recipe/multitenancy/app/list' \
--header 'api-key: ' \
--header 'Content-Type: application/json'

You will get the following JSON output:

{
"status": "OK",
"apps": [{
"appId": "app1",
"tenants": [{
"tenantId": "customer1",
"emailPassword": {
"enabled": true
},
"thirdParty": {
"enabled": true,
"providers": [...]
},
"passwordless": {
"enabled": true
},
"coreConfig": {...}
}]
}]
}
Looking for older versions of the documentation?
Which UI do you use?
Custom UI
Pre built UI