diff --git a/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/utils/SCIMCommonUtils.java b/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/utils/SCIMCommonUtils.java index cd5d40887..d1b326ace 100644 --- a/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/utils/SCIMCommonUtils.java +++ b/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/utils/SCIMCommonUtils.java @@ -860,12 +860,9 @@ public static void updateEveryOneRoleV2MetaData(int tenantId) { try { UserStoreManager userStoreManager = (UserStoreManager) SCIMCommonComponentHolder.getRealmService(). getTenantUserRealm(tenantId).getUserStoreManager(); - String domainName = UserCoreUtil.getDomainName(userStoreManager.getRealmConfiguration()); SCIMGroupHandler scimGroupHandler = new SCIMGroupHandler(userStoreManager.getTenantId()); String everyoneRoleName = userStoreManager.getRealmConfiguration().getEveryOneRoleName(); - String everyoneRoleNameWithDomain = - UserCoreUtil.addDomainToName(everyoneRoleName, domainName); - scimGroupHandler.addRoleV2MandatoryAttributes(everyoneRoleNameWithDomain); + scimGroupHandler.addRoleV2MandatoryAttributes(everyoneRoleName); } catch (org.wso2.carbon.user.api.UserStoreException | IdentitySCIMException e) { log.error(e); } @@ -884,11 +881,8 @@ public static void updateSystemRoleV2MetaData(int tenantId) { try { UserStoreManager userStoreManager = (UserStoreManager) SCIMCommonComponentHolder.getRealmService(). getTenantUserRealm(tenantId).getUserStoreManager(); - String domainName = UserCoreUtil.getDomainName(userStoreManager.getRealmConfiguration()); SCIMGroupHandler scimGroupHandler = new SCIMGroupHandler(userStoreManager.getTenantId()); - String systemRoleNameWithDomain = - UserCoreUtil.addDomainToName(AccountConstants.ACCOUNT_LOCK_BYPASS_ROLE, domainName); - scimGroupHandler.addRoleV2MandatoryAttributes(systemRoleNameWithDomain); + scimGroupHandler.addRoleV2MandatoryAttributes(AccountConstants.ACCOUNT_LOCK_BYPASS_ROLE); } catch (org.wso2.carbon.user.api.UserStoreException | IdentitySCIMException e) { log.error(e); }