diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/UserManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/UserManagementServiceImpl.java index 42aa120a85f..33495907d1f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/UserManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/UserManagementServiceImpl.java @@ -220,9 +220,7 @@ public class UserManagementServiceImpl implements UserManagementService { log.debug("User credential of username: " + username + " has been changed"); } List currentRoles = this.getFilteredRoles(userStoreManager, username); - List newRoles = new ArrayList<>(); - newRoles.add(DEFAULT_DEVICE_USER); - newRoles.addAll(Arrays.asList(userInfo.getRoles())); + List newRoles = Arrays.asList(userInfo.getRoles()); List rolesToAdd = new ArrayList<>(newRoles); List rolesToDelete = new ArrayList<>();