Multi-tenant ASP.NET Core Identity: each tenant gets its own users, roles, and passkeys.
MultiTenant Identity gives each tenant its own users, roles, claims, logins, and passkeys while sharing one Identity database and one codebase.
Derive your Identity DbContext from MultiTenantIdentityDbContext and configure Identity as you normally would. It builds on MultiTenant Entity Framework Core.
dotnet add package Finbuckle.MultiTenant.Identity.EntityFrameworkCore
public class AppIdentityDbContext(DbContextOptions<AppIdentityDbContext> options)
: MultiTenantIdentityDbContext<string>(options);
builder.Services.AddMultiTenantDbContext<AppIdentityDbContext, string>(options =>
options.UseSqlServer(connectionString));
builder.Services.AddIdentity<IdentityUser, IdentityRole>()
.AddEntityFrameworkStores<AppIdentityDbContext>();Releases
| Version | Targets | Released | Release notes |
|---|---|---|---|
| v11.0.0New | .NET 11 | Nov 24, 2026 | Release notes |
| v10.2.0 | .NET 10 | Nov 12, 2026 | Release notes |
Users and roles per tenant
Every Identity entity is multi-tenant by default, and unique indexes include the tenant, so the same user name or email can exist in more than one tenant.
- Works with custom user and role types.
- Normalized user names and emails are unique per tenant.
- Supports string, int, Guid, and other tenant ID types.
public class AppUser : IdentityUser
{
public string? DisplayName { get; set; }
}
public class AppIdentityDbContext(DbContextOptions<AppIdentityDbContext> options)
: MultiTenantIdentityDbContext<AppUser, string>(options);Passkeys per tenant
With Identity schema version 3, passkeys are isolated by tenant just like users, with no extra DbContext configuration.
- Passkey entities become multi-tenant automatically.
- Passkey unique indexes include the tenant.
builder.Services.Configure<IdentityOptions>(options =>
{
// Identity schema version 3 enables passkeys
options.Stores.SchemaVersion = new Version(3, 0);
});The rest of the MultiTenant family
MultiTenant Abstractions
Finbuckle.
The shared contracts: tenant info, strategy, store, and tenant context interfaces, with no implementation dependencies.
Learn moreMultiTenant
Finbuckle.
The foundation: tenant resolution, tenant stores, per-tenant options, and running work as a tenant in any .NET app.
Learn moreMultiTenant for ASP.NET Core
Finbuckle.
Middleware, request-based strategies, and per-tenant authentication for ASP.NET Core apps.
Learn moreMultiTenant for EF Core
Finbuckle.
Per-tenant data isolation for EF Core, in a shared database, a database per tenant, or a mix of both.
Learn more