Skip to Content

Authentication & Security

Tenancy levels

Tell Databrain how your customers' data is separated, so each guest token sees one customer only.

Tenancy tells Databrain where one customer’s rows end and the next customer’s rows start. You set it once per datasource. The clientId in each guest token then picks the customer.

The three levels

Tenancy levelYour data looks likeclientId in the guest token
TableOne shared table per entity. A column such as client_id, org_id or tenant_id says who owns each row.A value from the Primary key column of your Customer table, for example acme-corp.
DatabaseOne schema per customer on the same connection.The customer’s schema name, for example acme_corp.
Multi-databaseOne separate database per customer. Available on SQL Server and Microsoft Fabric when Databrain can see more than one database.The customer’s database name, for example acme_corp_db.

With no tenancy set, clientId is still required, but Databrain does not filter by it. Every token sees every row.

When to use each

  • Use Table when all customers share tables. This is the most common setup.
  • Use Database when each customer has a schema with the same tables.
  • Use Multi-database when each customer has a fully separate database.

How it works

  1. You set the Tenancy level on the datasource. For Table, you also pick the Customer table, its Primary key column, the Primary key type and an optional Customer name column. Configure tenants
  2. For Table, each metric must filter by the client column. The data app’s Tenancy tab shows any metric that does not.
  3. Your backend sends the customer’s value as clientId when it creates a guest token.
  4. Databrain checks that the value is a known customer. If it is not, the request can fail with CLIENT_ID_ERROR. The hint says what a valid value is.
  5. For each card, Databrain adds the filter for that customer, or reads that customer’s schema or database.

Check it in the app

Open the data app and select the Tenancy tab. It shows the tenancy level, the client column, where the client ID comes from, and which surfaces are not scoped yet: dashboard cards, underlying data, CSV and raw downloads, scheduled reports and embedded AI chat. Fix every open item before you share a token.

New customer in a Database or Multi-database setup? Run Sync Schema on the datasource first. Until then, the token request fails with CLIENT_ID_ERROR.

Next, check your embed before go-live.

On this page