Hi Descopers, I'm using the generate-sso-config-li...
# ask-a-descoper
a
Hi Descopers, I'm using the generate-sso-config-link flow to enable SSO configuration from within our app, but some users have multiple tenants. Is there any way to explicitly pass the desired tenant to the flow (through the React SDK) to avoid the "Cannot determine tenant from JWT" error?
r
Hi Adam, Yes, you can pass the tenant ID to avoid the "Cannot determine tenant from JWT" error. When users have multiple tenants, you need to specify which tenant's SSO configuration to display. Use the
form
prop in the Descope React component to pass the tenant ID:
Copy code
<Descope
  flowId="generate-sso-config-link"
  tenant=<tenantId>
/>
Alternatively, if you're embedding the SSO Setup Suite directly (not through a flow), you can pass the
tenantId
as a query parameter in the iframe URL:
Copy code
<iframe 
  src="https://api.descope.com/sso/setup?tenantId=your-tenant-id"
  width="100%"
  height="600"
  frameborder="0">
</iframe>
Note: If the JWT includes a
dct
claim, the selected tenant will automatically be picked up and the query parameter is unnecessary. If you need to change the tenant without running through a flow, you can use the
selectTenant
function from the React SDK. Doc: https://docs.descope.com/sso/sso-setup-suite-embed https://github.com/descope/descope-js/blob/main/packages/sdks/react-sdk/README.md