<div dir="ltr">Hello,<div><br></div><div>with the changes from this PR: <a href="https://github.com/keycloak/keycloak/pull/3120">https://github.com/keycloak/keycloak/pull/3120</a></div><div>the realm roles and client roles would also be available with a single GET request.</div><div><br></div><div>Cheers,</div><div>Thomas</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-09-09 9:21 GMT+02:00 Marek Posolda <span dir="ltr"><<a href="mailto:mposolda@redhat.com" target="_blank">mposolda@redhat.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Yep. You can take a look at our
testsuite for inspiration :
<a href="https://github.com/keycloak/keycloak/blob/master/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/UserTest.java" target="_blank">https://github.com/keycloak/<wbr>keycloak/blob/master/<wbr>testsuite/integration-<wbr>arquillian/tests/base/src/<wbr>test/java/org/keycloak/<wbr>testsuite/admin/UserTest.java</a>
.<br>
<br>
Especially see last test "roleMappings"<br>
<br>
Marek<div><div class="h5"><br>
<br>
On 08/09/16 20:30, Eric Matte wrote:<br>
</div></div></div>
<blockquote type="cite"><div><div class="h5">
<div>
<p class="MsoNormal">Hi, I need to get all user roles from a
specified user ID from all assigned groups for this particular
user.<u></u><u></u></p>
<p class="MsoNormal">I have searched into the API documentation
and found no link that could returns me all roles of the
authenticated user.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Currently, I have the user id, the realm
name, the client id, and an admin token.<u></u><u></u></p>
<p class="MsoNormal">I need to send a POST method from my
backend in order for it the properly set all the session’s
variables.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><a href="http://www.keycloak.org/docs/rest-api/%23_userrepresentation" target="_blank">http://www.keycloak.org/docs/<wbr>rest-api/#_userrepresentation</a><u></u><u></u></p>
<p class="MsoNormal">From this link, UserRepresentation seems to
have everything I need, but while checking the code on GitHub,
the function for “<b>GET /admin/realms/{realm}/users/{<wbr>id}”</b>
only returns the few first variables (name, email, id, etc.).
But, clientRoles, for instance, is not returned.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thank you<u></u><u></u></p>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>______________________________<wbr>_________________
keycloak-user mailing list
<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/keycloak-user</a></pre>
</blockquote>
<p><br>
</p>
</div>
<br>______________________________<wbr>_________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/keycloak-user</a><br></blockquote></div><br></div>