Recipes
.NET — B2B SaaS (multi-tenant)
← All recipes · First time? Set up your app (60 seconds — keys + redirect URI)
An ASP.NET Core app where each customer is a tenant, users may belong to multiple tenants, and roles are scoped per tenant. Builds on the single-tenant recipe — read that first; this page only shows the deltas.
1. What you'll build#
A B2B SaaS .NET backend where the user signs in, picks a tenant (Authaz Sign-In handles this UI), and every endpoint reads tenant_id from the access token to scope its work — including authorization checks against Zeratul.
2. Application setup#
Create the app as multi-tenant, shared pool:
POST https://your-app.authaz.io/api/v1/applications
X-API-Key: mgmt_01h...
{
"name": "my-saas",