<div dir="ltr"><div>I might be off here, but shouldn't this</div><div><br></div><div>            <action></div><div>               <handlerUri><a href="http://midpoint.evolveum.com/xml/ns/public/model/action-3#addFocus">http://midpoint.evolveum.com/xml/ns/public/model/action-3#addFocus</a></handlerUri></div><div>            </action></div><div><br></div><div>Be  'addUser' because it needs to create the user in midpoint?</div><div><br></div><div>            <action></div><div>               <handlerUri><a href="http://midpoint.evolveum.com/xml/ns/public/model/action-3#addUser">http://midpoint.evolveum.com/xml/ns/public/model/action-3#addUser</a></handlerUri></div><div>            </action></div><div><br></div><div>I think your code was off too, try the below</div><div><br></div><div>basic.norm(basic.stringify(givenName?.substring(0, 1) + familyName)) + iterationToken</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">JASON</div></div></div>
<br><div class="gmail_quote">On Thu, May 18, 2017 at 10:26 AM, BOSCHMANS Glenn <span dir="ltr"><<a href="mailto:gboschmans@cibg.brussels" target="_blank">gboschmans@cibg.brussels</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="NL-BE" link="#0563C1" vlink="#954F72">
<div class="m_40820899154681995WordSection1">
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial",sans-serif">Hi all,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial",sans-serif">Any ideas?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial",sans-serif">Best regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial",sans-serif">Glenn<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> midPoint [mailto:<a href="mailto:midpoint-bounces@lists.evolveum.com" target="_blank">midpoint-bounces@<wbr>lists.evolveum.com</a>]
<b>On Behalf Of </b>BOSCHMANS Glenn<br>
<b>Sent:</b> dinsdag 16 mei 2017 15:51</span></p><div><div class="h5"><br>
<b>To:</b> midPoint General Discussion<br>
<b>Subject:</b> Re: [midPoint] Generation of $user/name on reconcilitation of new account<u></u><u></u></div></div><p></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial",sans-serif">Hi all,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">Thanks for the information, but sadly still no luck. All I end up with is a shadow with a partial result that is in status fatal_error. I found this in the logs.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">2017-05-16 15:40:04,072 [] [midPointScheduler_Worker-3] ERROR (com.evolveum.midpoint.model.<wbr>impl.util.<wbr>AbstractSearchIterativeResultH<wbr>andler): Reconciliation of object
 shadow:7a70d0e8-839f-473b-<wbr>ade6-ce38c91f7895(62f64fd8-<wbr>4807-4a3c-8c32-129d8df890d1) from resource:94f21f3e-89b6-4d93-<wbr>8cbc-e1bfc9fa41dd(External Database Userstore) failed: java.lang.<wbr>StringIndexOutOfBoundsExceptio<wbr>n: String index out of range: 1 expression in
 mapping 'JIT Username generation' in objectTemplate:52f4ca67-2bea-<wbr>4da9-b26b-bffbd852fa39(JIT Username generation)(givenName=null; familyName=null; ) in expression in mapping 'JIT Username generation' in objectTemplate:52f4ca67-2bea-<wbr>4da9-b26b-bffbd852fa39(JIT
 Username generation)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">So givenName and familyName are passed as null to the objectTemplate, but I don’t know why null is passed as those attributes have values in the database. I’ve probably
 forgotten to configure something, but I don’t know what it could be.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">Here is a part of the schema handling on the resource. I left out the attributes that have nothing to do with the username.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif"><schemaHandling><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">      <objectType><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         <kind>account</kind><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         <intent>default</intent><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         <default>true</default><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         <objectClass>ri:Account</<wbr>objectClass><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         <attribute><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <c:ref>icfs:uid</c:ref><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <displayName>UID</displayName><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <tolerant>true</tolerant><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <exclusiveStrong>false</<wbr>exclusiveStrong><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         </attribute><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         <attribute><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <c:ref>icfs:name</c:ref><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <tolerant>true</tolerant><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <exclusiveStrong>false</<wbr>exclusiveStrong><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <outbound><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <authoritative>true</<wbr>authoritative><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <exclusive>false</exclusive><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <strength>normal</strength><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <source><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">                  <c:path>$user/name</c:path><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               </source><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            </outbound><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         </attribute><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         <attribute><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <c:ref>ri:accountUsername</c:<wbr>ref><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <tolerant>true</tolerant><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <exclusiveStrong>false</<wbr>exclusiveStrong><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <outbound><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <authoritative>true</<wbr>authoritative><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <exclusive>false</exclusive><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <strength>normal</strength><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <source><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">                  <c:path>$user/name</c:path><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               </source><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            </outbound><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         </attribute><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         <attribute><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <c:ref>ri:accountFirstName</c:<wbr>ref><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <tolerant>true</tolerant><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <exclusiveStrong>false</<wbr>exclusiveStrong><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <outbound><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <authoritative>true</<wbr>authoritative><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <exclusive>false</exclusive><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <strength>normal</strength><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <source><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">                  <c:path>$user/givenName</c:<wbr>path><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               </source><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            </outbound><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <inbound><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <authoritative>true</<wbr>authoritative><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <exclusive>false</exclusive><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <strength>normal</strength><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <target><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">                  <c:path>$user/givenName</c:<wbr>path><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               </target><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            </inbound><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         </attribute><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         <attribute><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <c:ref>ri:accountLastName</c:<wbr>ref><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <tolerant>true</tolerant><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <exclusiveStrong>false</<wbr>exclusiveStrong><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <outbound><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <authoritative><wbr>true</authoritative><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <exclusive>false</exclusive><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <strength>normal</strength><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <source><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">                  <c:path>$user/familyName</c:<wbr>path><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               </source><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            </outbound><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <inbound><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <authoritative>true</<wbr>authoritative><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <exclusive>false</exclusive><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <strength>normal</strength><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <target><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">                  <c:path>$user/familyName</c:<wbr>path><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               </target><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            </inbound><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         </attribute><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">        
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         <credentials><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <password><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <outbound><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">                  <authoritative>true</<wbr>authoritative><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">                  <exclusive>false</exclusive><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">                  <strength>normal</strength><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               </outbound><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            </password><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         </credentials><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">      </objectType><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">   </schemaHandling><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">Here is a part of the synchronization (only unmatched):<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif"><synchronization><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">      <objectSynchronization><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         <name>Sync External DB Userstore</name><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         <kind>account</kind><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         <intent>default</intent><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         <focusType>c:UserType</<wbr>focusType><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         <enabled>true</enabled><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         <reconcile>true</reconcile><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">        
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         <reaction><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <situation>unmatched</<wbr>situation><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <objectTemplateRef oid="52f4ca67-2bea-4da9-b26b-<wbr>bffbd852fa39" type="c:ObjectTemplateType"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <targetName><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">                  <t:orig>JIT Username generation</t:orig><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">                  <t:norm>jit username generation</t:norm><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               </targetName><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            </objectTemplateRef><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <action><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">               <handlerUri><a href="http://midpoint.evolveum.com/xml/ns/public/model/action-3#addFocus%3C/handlerUri" target="_blank">http://midpoint.<wbr>evolveum.com/xml/ns/public/<wbr>model/action-3#addFocus</<wbr>handlerUri</a>><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            </action><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         </reaction><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">      </objectSynchronization><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">   </synchronization><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">And finally the mapping in the objectTemplate:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif"><mapping><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">      <name>JIT Username generation</name><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">      <strength>weak</strength><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">      <source><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         <c:path>$user/givenName</c:<wbr>path><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">      </source><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">      <source><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         <c:path>$user/familyName</c:<wbr>path><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">      </source><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">      <expression><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         <script><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">            <code><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">                              <wbr>                              <wbr>   return basic.norm(basic.stringify(<wbr>givenName)).substring(0,1) + basic.norm(basic.stringify(<wbr>familyName))+
 iterationToken<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">                              <wbr>                 </code><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         </script><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">      </expression><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">      <target><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">         <c:path>name</c:path><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">      </target><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif">   </mapping><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> midPoint [<a href="mailto:midpoint-bounces@lists.evolveum.com" target="_blank">mailto:midpoint-bounces@<wbr>lists.evolveum.com</a>]
<b>On Behalf Of </b>Ivan Noris<br>
<b>Sent:</b> maandag 15 mei 2017 20:33<br>
<b>To:</b> midPoint General Discussion<br>
<b>Subject:</b> Re: [midPoint] Generation of $user/name on reconcilitation of new account<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal"><span style="color:black">Hi Glenn,</span><span style="font-size:12.0pt;color:black"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">the trick with object template from Roman and Gustav is one (probably best) possibility.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">I can imagine also something like this (not tested, but should work):<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black"><attribute><br>
  <ref>icfs:name</ref><br>
  <inbound><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">    <source><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">      <path>$account/<wbr>accountUsername</path><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">    </source><u></u><u></u></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="color:black">    <source><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">      <path>$account/<wbr>accountFirstname</path><u></u><u></u></span></p>
</div>
<p class="MsoNormal"><span style="color:black">    </source><u></u><u></u></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="color:black">    <source><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">      <path>$account/<wbr>accountLastname</path><u></u><u></u></span></p>
</div>
<p class="MsoNormal"><span style="color:black">    </source><br>
    <expression><br>
      <script><br>
        <code><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">if (!basic.isEmpty(<wbr>accountUsername)) {<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">  return accountUsername // return accountUsername if it's not null<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">} else {<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">  return accountFirstname + '.' + accountLastname // do whatever you need here<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">}<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">        </code><br>
      </script><br>
    </expression><br>
    <target><br>
      <path>$user/name</path><br>
    </target><br>
  </inbound><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black"></attribute><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">The mapping is inbound for icfs:name, because for normal connector, that attribute will always exist.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">I don't know if you already have some inbound for that attribute, but you can have several (more than 1) inbounds for the same attribute.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">The question is if the mapping should also change the existing username in midPoint, if not, the mapping should be weak.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">Please note that this solution will
<strong><span style="font-family:"Calibri",sans-serif">not</span></strong> generate unique username in midPoint. For that you must use object template with iterators [1].<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">[1] <a href="https://wiki.evolveum.com/display/midPoint/Unique+midPoint+User+Name" target="_blank">
https://wiki.evolveum.com/<wbr>display/midPoint/Unique+<wbr>midPoint+User+Name</a><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">Regards,<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">Ivan<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black"><u></u> <u></u></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center"><span style="color:black">
<hr size="2" width="100%" align="center">
</span></div>
<blockquote style="border:none;border-left:solid #1010ff 1.5pt;padding:0cm 0cm 0cm 4.0pt;margin-left:3.75pt;margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><b><span style="font-family:"Helvetica",sans-serif;color:black">From:
</span></b><span style="font-family:"Helvetica",sans-serif;color:black">"BOSCHMANS Glenn" <<a href="mailto:gboschmans@cibg.brussels" target="_blank">gboschmans@cibg.brussels</a>><br>
<b>To: </b><a href="mailto:midpoint@lists.evolveum.com" target="_blank">midpoint@lists.evolveum.com</a><br>
<b>Sent: </b>Monday, May 15, 2017 4:36:26 PM<br>
<b>Subject: </b>[midPoint] Generation of $user/name on reconcilitation of new        account<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span style="font-family:"Helvetica",sans-serif;color:black"><u></u> <u></u></span></p>
</div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black">Hi all,</span><span style="color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black"> </span><span style="color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black">We are creating a new environment in which midPoint will be used as IDM and WSO2 IS as IdP. When a user registers in the IdP (through Just In Time-provisioning
 with a federated IdP) this will be based on their eID. A username is not created, and thus not stored in the database userstore.
</span><span style="color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black">The next step is to add those users in midPoint. We planned on doing reconciliation during live synchronization. However, as the username is null in the
 database, we don’t have a value for the $user/name attribute and so the creation of the new user fails.</span><span style="color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black"> </span><span style="color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black">Is there a possibility in the schema handling to configure the first name and last name to generate a username? For example:</span><span style="color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black">accountFirstName: Glenn</span><span style="color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black">accountLastName: Boschmans</span><span style="color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black"> </span><span style="color:black"><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:18.0pt"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black">-> $user/name: gboschmans</span><span style="color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black"> </span><span style="color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black">I thought about using a Groovy script in the inbound of accountUsername to see if the attribute accountUsername is null. If not null return the value
 of the accountUsername attribute. If it is null, then I want to generate the username based on attributes accountFirstName and accountLastName. However, I’m not sure if it is possible to get the values of attributes accountFirstName and accountLastName.
</span><span style="color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black"> </span><span style="color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black">Any ideas?
</span><span style="color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black"> </span><span style="color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black">Thanks in advance!</span><span style="color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black"> </span><span style="color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black">Best regards,</span><span style="color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black">Glenn Boschmans</span><span style="color:black"><u></u><u></u></span></p>
<div>
<table class="m_40820899154681995MsoNormalTable" border="0" cellpadding="0">
<tbody>
<tr>
<td width="306" valign="top" style="width:229.5pt;border:none;border-right:solid #fecb00 1.0pt;padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><img border="0" width="300" height="101" id="m_40820899154681995_x0000_i1026" src="cid:image001.png@01D2CFFB.E6FE6BA0"><u></u><u></u></span></p>
</td>
<td valign="top" style="padding:.75pt .75pt .75pt .75pt">
<p><span class="m_40820899154681995titrecar"><b><span lang="EN-US" style="font-size:15.0pt;font-family:"Calibri Light",sans-serif;color:#0080bf">Glenn Boschmans</span></b></span><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><br>
</span><span class="m_40820899154681995MsoSubtleReference"><span lang="EN-US" style="font-size:10.0pt;font-family:"Calibri Light",sans-serif;color:#0a00be">Consultant</span></span><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><br>
</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri Light",sans-serif;color:#164397">Business Integrated Solutions
</span><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><br>
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Calibri Light",sans-serif">Kunstlaan 21, 1000 Brussel -
<span style="color:#0080bf"><a href="http://cibg.brussels" target="_blank"><span style="color:#0080bf">cibg.brussels</span></a></span> -
<span style="color:#0080bf"><a href="http://cibg.brussels/disclaimer-1" target="_blank"><span style="color:#0080bf">disclaimer</span></a></span></span><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><br>
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Calibri Light",sans-serif"><a href="tel:+32%202%20282%2047%2070" value="+3222824770" target="_blank">+32 2 282 47 70</a><span style="color:#fecb00"> | </span><span style="color:black"> 
<br>
</span></span><span lang="EN-US" style="font-size:9.0pt;font-family:"Calibri Light",sans-serif;color:#61c250">Be green, leave it on the screen !</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Calibri Light",sans-serif;color:black">                             <wbr>                         
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Calibri Light",sans-serif"><a href="http://www.linkedin.com/company/cirb_cibg" target="_blank"><span style="text-decoration:none"><img border="0" width="22" height="19" id="m_40820899154681995_x0000_i1027" src="cid:image002.png@01D2CFFB.E6FE6BA0"></span></a>  <a href="https://twitter.com/CIRB_CIBG" target="_blank"><span style="text-decoration:none"><img border="0" width="19" height="19" id="m_40820899154681995_x0000_i1028" src="cid:image003.png@01D2CFFB.E6FE6BA0"></span></a>  <a href="http://www.leefmilieu.brussels/themas/duurzame-stad/label-ecodynamische-onderneming" target="_blank"><span style="text-decoration:none"><img border="0" width="19" height="19" id="m_40820899154681995_x0000_i1029" src="cid:image004.jpg@01D2CFFB.E6FE6BA0"></span></a></span><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><u></u><u></u></span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"><br>
______________________________<wbr>_________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a><u></u><u></u></span></p>
</blockquote>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:black"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:black"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:black">--
<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:black">Ivan Noris<br>
Senior Identity Engineer<br>
<a href="http://evolveum.com" target="_blank">evolveum.com</a><u></u><u></u></span></p>
</div>
</div>
</div></div></div>
</div>

<br>______________________________<wbr>_________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a><br>
<br></blockquote></div><br></div></div>