Skip to content

Multi tenant configuration

Jon P Smith edited this page Aug 12, 2021 · 12 revisions

By default AuthP's multi-tenant feature is not activated. To turn it on you need to set the TenantType to either:

  • TenantTypes.SingleLevel where each tenant is completely separate from other tenants
  • TenantTypes.HierarchicalTenant where each tenant can create sub-tenants

The code below shows how you would set the TenantType on startup

services.RegisterAuthPermissions<Example4Permissions>(options =>
    {
        options.TenantType = TenantTypes.HierarchicalTenant;
    })
    // ... other AuthP setup methods left out.

As well as setting the type of the tenant type this also registers the GetDataKeyFilterFromUser against the IDataKeyFilter interface - see Creating a multi-tenant app for how you can use this service.

NOTE: See Multi tenant explained of more on these two types of multi-tenant feature.

Articles / Videos

Concepts

Setup

Usage

Admin

SupportCode

Clone this wiki locally