<div dir="ltr">In that case could you just set the contact email address as an attribute instead? The email field has to be unique has it can be in place of username. You could even use protocol mappers to map either email or the attribute to the same claim in the token.</div><div class="gmail_extra"><br><div class="gmail_quote">On 25 November 2015 at 15:57, Sebastian Olscher <span dir="ltr"><<a href="mailto:sebastian.olscher@traveltainment.de" target="_blank">sebastian.olscher@traveltainment.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="DE" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">This receives importance if we are talking about users which will be used by a system and not a human person. These users may have the same responsible
contact person as there is a system using this account and no real human. The contact person is identified by the email address. Our own specific information will be designed as user attributes.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">For example:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Username: sys_customer1<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Email address:
</span><span lang="EN-US"><a href="mailto:sebastian.olscher@traveltainment.de" target="_blank">sebastian.olscher@traveltainment.de</a>
</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">(Email address of the contact person who is responsible for this user)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">User attribute: Key=customer, Value=customer1<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Username: sys_customer2<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Email address:
</span><span lang="EN-US"><a href="mailto:sebastian.olscher@traveltainment.de" target="_blank">sebastian.olscher@traveltainment.de</a>
</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">(Email address of the contact person who is responsible for this user)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">User attribute: Key=customer, Value=customer2<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Stian Thorgersen [mailto:<a href="mailto:sthorger@redhat.com" target="_blank">sthorger@redhat.com</a>]
<br>
<b>Sent:</b> Wednesday, November 25, 2015 3:04 PM<br>
<b>To:</b> Sebastian Olscher<br>
<b>Cc:</b> <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
<b>Subject:</b> Re: [keycloak-user] Email is unique within one realm<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<div>
<p class="MsoNormal">That's not possible at the moment. Out of curiosity why would you have two different accounts for the same person?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On 25 November 2015 at 15:01, Sebastian Olscher <<a href="mailto:sebastian.olscher@traveltainment.de" target="_blank">sebastian.olscher@traveltainment.de</a>> wrote:<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">Hello,<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">the email address is unique within one realm. Is there a possibility to fulfill the requirement to have different user (different usernames) for different applications
within one realm which were managed and used by the same person/entity?</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"><br>
For example:</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">Username: I_Am_An_Admin</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">Email:
<a href="mailto:user@traveltainment.de" target="_blank">user@traveltainment.de</a></span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">(gets roles for every client within the realm)</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">Username: I_Am_A_Normal_User</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">Email:
<a href="mailto:user@traveltainment.de" target="_blank">user@traveltainment.de</a></span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">(get roles from only one client within the realm)</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">Is this unambiguity of the email address configurable?</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">Thanks,</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">Sebastian</span><u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><br>
_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>
</blockquote></div><br></div>