Tenanted Options for Multitenant Applications in ASP

Siarhei Kharlap
10 min readSep 8, 2023
Photo by Natasha Polyakova on Unsplash

While the issue is specific to multitenancy, there are still numerous applications that have been developed using this approach. As a developer of such systems, you may also encounter challenges related to the absence of multitenancy in the embedded Options feature. Unfortunately, Microsoft hasn’t been responsive to our requests, which is why I took it upon myself to implement it independently. I’m delighted to share my solution with you.

The scope of the problem

In multitenant applications, we often encounter a common problem where features designed for shared use need to be adapted for tenant-specific requirements. This typically involves configuring settings and databases on a per-tenant basis.

We recently faced a similar situation when tasked with building an OAuth server that had to meet the requirement of ‘maintaining unique and distinguishable secrets, tokens, and signing-encryption certificates for each tenant.’ While this may seem like a reasonable security feature, it brought about a lot of complex solutions. Most modern applications rely on third-party components, and integrating tenant-specific functionality can be challenging if these components don’t already offer such options.

--

--