Error in client credential grant with enabling Use tenant domain in local subject identifier
@@ -183,7 +183,8 @@ public class AuthenticatedUser extends User {
if (useUserstoreDomainInLocalSubjectIdentifier && StringUtils.isNotEmpty(userStoreDomain)) {
authenticatedSubjectIdentifier = IdentityUtil.addDomainToName(userName, userStoreDomain);
}
- if (useTenantDomainInLocalSubjectIdentifier && StringUtils.isNotEmpty(tenantDomain)) {
+ if (useTenantDomainInLocalSubjectIdentifier && StringUtils.isNotEmpty(tenantDomain) &&
+ StringUtils.isNotEmpty(authenticatedSubjectIdentifier)) {
authenticatedSubjectIdentifier = UserCoreUtil.addTenantDomainToEntry(authenticatedSubjectIdentifier,
tenantDomain);
}
