<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">I don't think we have this at this
      moment. Feel free to create jira, but no promise if/when we
      provide it...<br>
      <br>
      btv. it seems that your query doesn't handle composite roles, but
      really just those roles, which are directly assigned to user in
      user_role_mapping table. I don't know if you care about it... Fact
      is that doing single SQL query including composite roles is
      probably not doable unless you are on Oracle, which allows some
      kind of hierarchical queries afaik.<br>
      <br>
      Marek<br>
      <br>
      On 18.11.2014 18:37, Alarik Myrin wrote:<br>
    </div>
    <blockquote
cite="mid:CAKTx7M5cBEZmg6VsxCp=paA47Y0ti6Xn65eK31p9J4gD4awd9w@mail.gmail.com"
      type="cite">
      <div dir="ltr">I was able to piece together a SQL query:
        <div><br>
        </div>
        <div>
          <p class=""><font face="courier new, monospace">SELECT
              u.username, u.first_name, </font><span
              style="font-family:'courier new',monospace">u.last_name, <a
                moz-do-not-send="true" href="http://role.name">role.name</a>
              AS role </span></p>
          <p class=""><span style="font-family:'courier new',monospace">FROM
              keycloak_role role </span></p>
          <p class=""><span style="font-family:'courier new',monospace">INNER
              JOIN realm ON role.realm = <a moz-do-not-send="true"
                href="http://realm.id">realm.id</a> </span></p>
          <p class=""><span style="font-family:'courier new',monospace">INNER
              JOIN user_role_mapping rm ON <a moz-do-not-send="true"
                href="http://role.id">role.id</a> = rm.role_id </span></p>
          <p class=""><span style="font-family:'courier new',monospace">INNER
              JOIN user_entity u ON rm.user_id = <a
                moz-do-not-send="true" href="http://u.id">u.id</a> </span></p>
          <p class=""><span style="font-family:'courier new',monospace">WHERE
              <a moz-do-not-send="true" href="http://realm.name">realm.name</a>=:1
              AND <a moz-do-not-send="true" href="http://role.name">role.name</a>
              = :2</span></p>
          <p class="">It might be nice to do this in the web console
            though...</p>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Tue, Nov 18, 2014 at 12:28 PM,
          Alarik Myrin <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:alarik@zwift.com" target="_blank">alarik@zwift.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">Is there any easy way to see which users have
              been assigned a given role?</div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
keycloak-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/keycloak-user">https://lists.jboss.org/mailman/listinfo/keycloak-user</a></pre>
    </blockquote>
    <br>
  </body>
</html>