Ereli
10/31/2025, 6:20 PMEreli
10/31/2025, 6:45 PM{
"amr": "[list-of-strings-of-identifiers-used]",
"drn": "[string-of-type-of-token]",
"exp": "[timestamp-of-expiration-time]",
"iat": "[timestamp-of-issued-time]",
"iss": "https://api.descope.com/xxxxx",
"sub": "[string-of-user-id]",
"dct": "string-tenant-id",
"roles": "[list-of-strings] //tenant level",
"permissions": "[list-of-strings] //tenant level",
"tenant_list": "{{[tenants_list_of_ids]}}"
}
is that possible?Gilad Shriki
11/01/2025, 1:05 AMEreli
11/03/2025, 4:12 PMEreli
11/03/2025, 4:12 PMGilad Shriki
11/04/2025, 5:13 AMEreli
11/05/2025, 4:32 PMCurrent tenant, no tenant reference would work, but we'd still need to a way to get the list of the tenants for a user so the user can trigger a sessions switch between tenants.Gilad Shriki
11/06/2025, 1:46 AMChris Carper
11/06/2025, 3:55 PM/v1/auth/tenant/select API endpoint? The widget within an embedded flow would already load the applicable tenants for that user and allow them to switch between them. @Bhagyesh Parna @Nick Rodriguez - do you recall me having an example of this recently? It'd basically be an embedded flow that calls load user, then has a small screen with the select tenant widget.
@Ereli - is it moreso the number of tenants on the JWT or the tenants paired with the permissions? We do have a feature coming out soon to allow you to not add all of the tenant level permissions to the JWT that may be helpful.
@Bhagyesh Parna please monitor and follow up here as needed.Ereli
11/07/2025, 12:48 AMdct for the selected tenant or storing that elsewhere on the browser sessions doesn't address the issue directly.
if there was another endpoint tell the user which tenant they can access we could have used that well, but I couldn't find one in the docs.Bhagyesh Parna
11/07/2025, 2:20 PMmyTenants() to render your own tenant list in-app.
3. When a user picks a tenant, call selectTenant(tenantId, refreshToken) and then replace the session token with the returned one (now scoped to that tenant).
4. Repeat step 3 whenever they switch tenants.
Docs: Client SDK Auth Helpers