Default roles returns the roles of the client that are added to new users
by default, not the available client roles. To see roles do:
getRealm().clients().getClient(clientRepresentation.getId()).roles().list()
On 27 September 2016 at 10:56, Jitendra Chouhan <jitendrachouhan03(a)gmail.com
wrote:
Hi,
I am not able to get client level available roles in keycloak using
keycloak-admin-client.jar. Please find sample code i am using to get client
and then thought of getting available roles under a client.
ClientsResource clientsResource = getRealm().clients();
ClientRepresentation> clientsRepresentation =
clientsResource.findByClientId(appName);
clientRepresentation = clientsRepresentation.get(0);
clientRepresentation.getDefaultRoles();
With above code i am only getting default roles under a client but not all
available roles as there is no method available in ClientResource class.
Thanks,
Jitendra Chouhan
_______________________________________________
keycloak-user mailing list
keycloak-user(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user