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 is tenantid12  
URL is tenantid45

Having some issues defining the tenant before login.

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: