Here keys are the email domains and the values are the connection names. Make sure you have added clientId and tenantId for the connection name. Connection names are just logical keys to make it easy to organize configurations.
You can override the global domain configuration and have it specific to a user. Add the key as the email address in the connectionsByEmail map and the value as the connection name which corresponds to the AD environment to which the user belongs.
Microservices Configuration
Similar configuration needs to be added to the application.conf in bothauthentication and user microservices. Here is a configuration example:
1
sso {
2
domainMapping = [
3
{
4
domain = "tradecloud1.onmicrosoft.com"
5
companyId = "HIDDEN"
6
tenantId = "HIDDEN"
7
},
8
{
9
domain = "tradecloud1accp.onmicrosoft.com"
10
companyId = "HIDDEN"
11
tenantId = "HIDDEN"
12
}
13
]
14
}
Copied!
This is a list of SSO mappings corresponding to each AD environment for which we want to enable SSO. Each element contains
domain - the email domain
companyId - Tradecloud company id to which the user belongs
tenantId - Azure AD tenant Id. This is used to validate the JWT.
path of application.conf in authentication microservice - authentication/src/main/resources/application.conf
path of application.conf in user microservice - user/src/main/resources/application.conf