There is no need to use an additional application instead of the authentication role - in any case, there may be some specific side effects for the authenticating user, such as extraneous / incomplete logging, role mismatches, and missing system / internal links.
What do you use for credentials for your application (TenantID, etc.)? AD is very strict in credential management, so I will return to the structure of the application.
At the query level, you can make all tables completely separate for each tenant without common table data and include a multi-user identifier type column so that no one can inject sql if you would necessarily include the multican identifier in an explicit variable.
Then, in the entity model, you can inherit the multican interface for everyone who refers to tenant identifiers (as part of EF).
Thus, the burden is isolated from OAuth or other libraries on top of this to take care of third-party authentication.
miniscule
source share