<div dir="ltr"><div>Steps to reproduce:</div><div><br></div><div>create client A with client id &quot;client-a&quot; with a newly defined role &quot;user&quot;</div><div>create client B with client id &quot;client-b&quot; with a newly defined role &quot;user&quot;</div><div><br></div><div>create user A with <span class="" id=":5as.1" tabindex="-1">username</span> &quot;user-a&quot; with &quot;user&quot; role granted for &quot;client-a&quot;</div><div>create user B with <span class="" id=":5as.2" tabindex="-1">username</span> &quot;user-b&quot; with &quot;user&quot; role granted for &quot;client-b&quot;</div><div><br></div><div><span class="" id=":5as.3" tabindex="-1">Goto</span> applications tab in account page:</div><div>http://<span class="" id=":5as.4" tabindex="-1">localhost</span>:8082/<span class="" id=":5as.5" tabindex="-1">auth</span>/realms/<span class="" id=":5as.6" tabindex="-1">eurodata</span>.local/account/applications</div><div><br></div><div><span class="" id=":5as.7" tabindex="-1">login</span> as user-a</div><div><br></div><div>Actual: The listing shows both applications client-a AND client-b </div><div>        although the user-a only has a user-role to client-a.</div><div>Expected: Only client-a (+ account) applications should be shown</div><div><br></div><div><span class="" id=":5as.8" tabindex="-1">logout</span></div><div><br></div><div><span class="" id=":5as.9" tabindex="-1">login</span> as user-b</div><div><br></div><div>Actual: The listing shows both applications client-a and client-b </div><div>        although the user-b only has a user-role to client-b.</div><div>Expected: Only client-b (+ account) applications should be shown</div><div><br></div><div>By default a client has the &quot;Full Scope Allowed&quot; switch set to &quot;on&quot;.</div><div>Changing this switch to &quot;off&quot; and explicitly assigning the client role &quot;user&quot; to &quot;client-a&quot; </div><div>in the scope settings for client-a and to the user role for client-b in the scope settings </div><div>for client-b solves the issue.</div><div><br></div><div>With this setting only the applications for which a user actually has the &quot;user&quot; role is shown.</div><div><br></div><div>Even though the help text for &quot;Full Scope Allowed&quot; says: &quot;Allows you to disable all restrictions&quot;</div><div>one would expect that &quot;Full Scope Allowed&quot; set to &quot;on&quot; would honor the assigned roles.</div><div><br></div><div>Is there something wrong here or should the help text be more descriptive?</div><div>I think the piece of code that does this is: org.<span class="" id=":5as.11" tabindex="-1">keycloak</span>.protocol.<span class="" id=":5as.12" tabindex="-1">oidc</span>.<span class="" id=":5as.13" tabindex="-1">TokenManager</span>.<span class="" id=":5as.14" tabindex="-1">getAccess</span>(String, <span class="" id=":5as.15" tabindex="-1">boolean</span>, <span class="" id=":5as.16" tabindex="-1">ClientModel</span>, <span class="" id=":5as.17" tabindex="-1">UserModel</span>)</div><div><br></div><div>Cheers,</div><div>Thomas</div></div>