[keycloak-user] Can't get roles of user via REST

Patrick Andreas Näf p.naef at naef-itcom.ch
Fri Sep 11 07:17:20 EDT 2015

Hi everybody

Started with the example:

That worked.

Then tried to get also the other interfaces.
Also that works:
But i don't get the roles of the user here.
So i think the permissions are there, i can get data.

If i try this:

i get an 404 error.
my code is:
String url = 

HttpGet get = new HttpGet(url);
get.addHeader("Authorization", "Bearer " + res.getToken());
HttpResponse response = client.execute(get);

if i open the same url in the browser i see "Bearer", what is logic to 
me and it shows that the server is there and the url is correct.

Keycloak version is 1.3.1.Final
Java: 8

Thanks a lot for you help / pointing me to the right place.

More information about the keycloak-user mailing list