Creating / Modifying Tenants in Flows
This guide will cover how to utilize flow action and create or modify a tenant with attributes within your application using Descope flows.
Note
This guide focuses on tenant management through the Descope UI console using flow actions. For SDK implementation, see Tenant Management.
Creating Tenants in Flows
The "Create Tenant" flow action allows you to create a new tenant during user signup if one doesn't already exist. You can configure several attributes during tenant creation:
- Tenant Name: The display name for the tenant
- Self Provision Domains: Domains associated with the tenant
- Tenant ID: A unique identifier for the tenant
- Roles: Permissions assigned to the tenant
These fields support dynamic values using the {{}}
syntax.
Modifying Tenants in Flows
The "Update Tenant" flow action allows you to update an existing tenant with new attributes. You can configure several attributes during tenant modification in a previous screen:
- Tenant Name: The display name for the tenant
- Self Provision Domains: Domains associated with the tenant
Example Flow
Here's an example flow that creates a tenant and assigns user permissions:
This flow demonstrates how to:
- Create a new tenant with custom attributes
- Add users to the tenant
- Update roles and permissions as needed
If a tenant already exists for a user's domain, the flow can update their roles and attributes instead of creating a new tenant.