userRepresentation.getCredentials() - is always null

Hi, I code in Java (Quarkus)

When I try to get userRepresentation.getCredentials() for some user who exists I always get null.
I know that it is not null, becouse i use to login (and it works) password which is located on this list.
What is the problem?

Hi, I have the same problem. Did you find the solution ?

I depends on how you retrieved the UserRepresentation object, and the permission of the caller.

You have to invoke usersResource.get(userRepresentation.getId()) to retrieve the credentials.

Also the user must have at least view-users and query-users permissions on Keycloak.