Fix the issue in JIT provisioning flow when the primary user store domain name is changed.
@@ -1614,9 +1614,13 @@ public class IdentityUtil {
IdentityException {
try {
+ if (StringUtils.isEmpty(userStoreDomain)) {
+ userStoreDomain = IdentityCoreServiceDataHolder.getInstance().getRealmService().getTenantUserRealm(tenantId).
+ getRealmConfiguration().getUserStoreProperty(UserCoreConstants.RealmConfig.PROPERTY_DOMAIN_NAME);
if (StringUtils.isEmpty(userStoreDomain)) {
userStoreDomain = UserCoreConstants.PRIMARY_DEFAULT_DOMAIN_NAME;
}
+ }
org.wso2.carbon.user.api.UserStoreManager userStoreManager = getUserStoreManager(tenantId, userStoreDomain);
try {
if (userStoreManager instanceof AbstractUserStoreManager) {
