Businesses need to grow in order to be successful and handle an increasing number of clients and partners, and if a company is not ready to respond to this load then there is a big chance that opportunities will be missed. This brings the topic of scalability into the game, as one of the main requirements that a company should address. One of the possible ways to address this requirement is to build a multi-tenant solution. And as this topic gains more importance, lots of options are available to achieve this, for example, using Microsoft Elastic database (elastic tools). However, in particular cases, like the case I faced on my project, not all of the product requirements could be satisfied with the available options. This brought me to the idea of gathering my experience on this topic and presenting it below.
The problem arises in solutions which contains identity servers based on OAuth2 and OpenId protocols (For example Identity Server, WSO2 identity cloud, etc) and Rest API with swagger swashbuckle used for auto documenting and testing. Each API call should contain authentication token otherwise testing API (“Try it out”) will not work.