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.setEmail("markoradinovic79(a)gmail.com");
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.
Show replies by date
Sorry for this, I was lazy and I didn't looked into source.