Hi,I'm trying to make REST call to create new user account.
HttpPost post = new HttpPost(KeycloakUriBuilder
.fromUri(getBaseUrl(request) + "/auth")
.path("/admin/realms/{realm-name}/users")
.build("EHR Cloud"));
UserRepresentation userRepresentation = new UserRepresentation();
userRepresentation.setUsername("radinovic.marko");
userRepresentation.setEnabled(true);
userRepresentation.credential(CredentialRepresentation.PASSWORD, "marko");
userRepresentation.attribute("institutionId", "4");
userRepresentation.attribute("institution", "ZipSoft");
userRepresentation.setRealmRoles(Arrays.asList(new String[] {"ehr-user-doctor"}));
After executing post, user is created, but user credentials and realm roles are not saved.
Also, I try to update user, but still there is no credentials and realm roles.
HttpPost post = new HttpPost(KeycloakUriBuilder
.fromUri(getBaseUrl(request) + "/auth")
.path("/admin/realms/{realm-name}/users")
.build("EHR Cloud"));
I check in database, and there is no credentials and roles.