Stian just FYI, apparently this is not fixed despite the ticket getting closed.
I had a brief look at the code, and it seems if the "username" is present and the "enabled" parameter is set to true in the request payload, a NullPointerException still gets thrown.
if (rep.isEnabled() != null && rep.isEnabled()) {
UsernameLoginFailureModel failureModel = session.sessions().getUserLoginFailure(realm, rep.getUsername().toLowerCase());
if (failureModel != null) {
failureModel.clearFailures();
}
}
This is in org.keycloak.services.resources.admin.UsersResource class.