diff --git a/modules/charon-core/src/main/java/org/wso2/charon3/core/protocol/endpoints/RoleResourceV2Manager.java b/modules/charon-core/src/main/java/org/wso2/charon3/core/protocol/endpoints/RoleResourceV2Manager.java index 4f15eefe5..458113435 100644 --- a/modules/charon-core/src/main/java/org/wso2/charon3/core/protocol/endpoints/RoleResourceV2Manager.java +++ b/modules/charon-core/src/main/java/org/wso2/charon3/core/protocol/endpoints/RoleResourceV2Manager.java @@ -737,6 +737,9 @@ private void processValueAttributeOfOperation(SCIMResourceTypeSchema schema, Pat } Map attributeList = attributeHoldingSCIMObject.getAttributeList(); + if (attributeList.isEmpty()) { + throw new BadRequestException(ResponseCodeConstants.DESC_BAD_REQUEST, ResponseCodeConstants.INVALID_SYNTAX); + } if (attributeList.containsKey(SCIMConstants.RoleSchemaConstants.DISPLAY_NAME)) { patchOperation.setAttributeName(SCIMConstants.RoleSchemaConstants.DISPLAY_NAME);