diff --git a/components/org.wso2.carbon.identity.scim2.common/pom.xml b/components/org.wso2.carbon.identity.scim2.common/pom.xml
index 2750e9868..4be83fd9d 100644
--- a/components/org.wso2.carbon.identity.scim2.common/pom.xml
+++ b/components/org.wso2.carbon.identity.scim2.common/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.identity.inbound.provisioning.scim2
identity-inbound-provisioning-scim2
../../pom.xml
- 3.4.45-SNAPSHOT
+ 3.4.46-SNAPSHOT
4.0.0
diff --git a/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/impl/SCIMRoleManagerV2.java b/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/impl/SCIMRoleManagerV2.java
index b7966317f..1f34f36b3 100644
--- a/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/impl/SCIMRoleManagerV2.java
+++ b/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/impl/SCIMRoleManagerV2.java
@@ -420,7 +420,7 @@ public RoleV2 patchRole(String roleId, Map> patchOp
updateGroups(roleId, groupOperations);
}
if (CollectionUtils.isNotEmpty(memberOperations)) {
- updateUsers(roleId, currentRoleName, memberOperations);
+ updateUsers(roleId, memberOperations);
}
HashMap requiredAttributes = new HashMap<>();
@@ -988,7 +988,7 @@ private void updateGroups(String roleId, List groupOperations)
}
}
- private void updateUsers(String roleId, String currentRoleName, List memberOperations)
+ private void updateUsers(String roleId, List memberOperations)
throws BadRequestException, CharonException, ForbiddenException {
Collections.sort(memberOperations);
@@ -1000,13 +1000,13 @@ private void updateUsers(String roleId, String currentRoleName, List memberObject = (Map) memberOperation.getValues();
prepareAddedRemovedUserLists(addedUsers, deletedUsers, newlyAddedUsersIds,
- memberOperation, memberObject, currentRoleName);
+ memberOperation, memberObject, roleId);
} else if (memberOperation.getValues() instanceof List) {
List