1. Home
  2. Docs
  3. Advanced Topics
  4. Multi Tenant Client Support

Multi Tenant Client Support

dotnet Report Builder supports Multi-tenant Clients and locking down data Client data, so that you can easily restrict users to only the companies and data they have access to, and not show data in reports that they should not have access to. It works off your current login mechanism in the application, whatever it is.

While setting up tables, you can provide which column in the table is the Client ID field:

Then you just provide the client id the currently logged in user has access to in the initialization method in ReportController:

private DotNetReportSettings GetSettings(){
           settings.ClientId = ""; // You can pass your multi-tenant client id here to track their reports and folders

You can populate the client id from your session data from cookies or claims. Maybe something like the following where you have a custom extension method to get claims:  

        settings.ClientId = User.Identity.GetClaim("ClientId").Value;

Then anytime a report is run where a user picks a table with “Account ID” specified, the client ID filter will automatically be applied and they will only see data they have access to. 

In addition to providing a single Client ID filter, you can also setup and apply Global Filters.

Was this article helpful to you? Yes No

How can we help?

Leave a Reply

Your email address will not be published. Required fields are marked *