Share via

Looking for a detailed resource to build a Multi-Tenant ASP.Net Core Application using EntityFramework and ASP.NET Identity

Ramzi Sahawneh 20 Reputation points
2023-10-21T18:17:34.3933333+00:00

I am looking to build a Multi-Tenant Web Application using ASP.Net Core along with EntityFramework, SQL Database, and ASP.net Core Identity.

I am Looking for a detailed resource from Microsoft.

Developer technologies | .NET | Entity Framework Core
SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories

Developer technologies | ASP.NET Core | Other
0 comments No comments

Answer accepted by question author

Bruce (SqlWork.com) 84,081 Reputation points
2023-10-21T20:34:47.78+00:00

Microsoft does not have much opinion on building multi tenant applications. Google for different architectures.

MS does cover multi tenant authentication with azure ad.

https://learn.microsoft.com/en-us/azure/active-directory/develop/howto-convert-app-to-be-multi-tenant

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Phil Johnson 5 Reputation points
    2023-10-23T11:38:42.5633333+00:00

    ASP.NET Core Identity is not multi tenant and presents a few challenges if you wish to make it so.

    The two that I came across that I had to solve were:

    1. Cookies - I had to use a cookie manager to ensure that the cookies for different tenants were different.
    2. LoginExpireMinutes - this could only be set in the startup classes and I had to alter my cookie manager to do this dynamically as different tenants required different login expire minutes.

    I am using Cookies, not sure if ASP.NET Core Identity can be used with JWT tokens or not (i.e. without identityserver4) and if this would make things any simpler or not.

    Hope this helps someone.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.