83
Views
1
Comments
Define Tenant ID from URL
Question

In a multitenant application, does anyone know if it is possible to match a URL to pass a tenant ID

Almost like adding another option besides Root Application for example a 'Root Tenant' 

so that I can define: 

URL app.companyx.com is tenantid12  
URL app.companya.com is tenantid45


Having some issues defining the tenant before login.

2019-07-08 11-04-35
Leonardo Fernandes
 
MVP

Hi Andre.

You can implement that logic to switch the tenant on the OnBeginWebRequest system event. To retrieve the domain of the current request, use the GetRequestDomain action from HTTPRequestHandler.


Simplified example:


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.