[midPoint] Generation of $user/name on reconcilitation of new account

Ivan Noris Ivan.Noris at evolveum.com
Mon May 15 20:33:09 CEST 2017


Hi Glenn, 

the trick with object template from Roman and Gustav is one (probably best) possibility. 

I can imagine also something like this (not tested, but should work): 

<attribute> 
<ref>icfs:name</ref> 
<inbound> 
<source> 
<path>$account/accountUsername</path> 
</source> 
<source> 
<path>$account/accountFirstname</path> 
</source> 
<source> 
<path>$account/accountLastname</path> 
</source> 
<expression> 
<script> 
<code> 
if (!basic.isEmpty(accountUsername)) { 
return accountUsername // return accountUsername if it's not null 
} else { 
return accountFirstname + '.' + accountLastname // do whatever you need here 
} 
</code> 
</script> 
</expression> 
<target> 
<path>$user/name</path> 
</target> 
</inbound> 
</attribute> 

The mapping is inbound for icfs:name, because for normal connector, that attribute will always exist. 
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. 
The question is if the mapping should also change the existing username in midPoint, if not, the mapping should be weak. 

Please note that this solution will not generate unique username in midPoint. For that you must use object template with iterators [1]. 

[1] https://wiki.evolveum.com/display/midPoint/Unique+midPoint+User+Name 

Regards, 
Ivan 

----- Original Message -----

> From: "BOSCHMANS Glenn" <gboschmans at cibg.brussels>
> To: midpoint at lists.evolveum.com
> Sent: Monday, May 15, 2017 4:36:26 PM
> Subject: [midPoint] Generation of $user/name on reconcilitation of new
> account

> Hi all,

> 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.

> 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.

> Is there a possibility in the schema handling to configure the first name and
> last name to generate a username? For example:

> accountFirstName: Glenn

> accountLastName: Boschmans

> -> $user/name: gboschmans

> 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.

> Any ideas?

> Thanks in advance!

> Best regards,

> Glenn Boschmans

> 

> Glenn Boschmans
> Consultant
> Business Integrated Solutions
> Kunstlaan 21, 1000 Brussel - cibg.brussels - disclaimer
> +32 2 282 47 70 |
> Be green, leave it on the screen !

> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint

-- 
Ivan Noris 
Senior Identity Engineer 
evolveum.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20170515/7de1a31b/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cibg_aee22c14-e9ed-4d7b-8c27-f6c4a26e7736.png
Type: image/png
Size: 11221 bytes
Desc: cibg_aee22c14-e9ed-4d7b-8c27-f6c4a26e7736.png
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20170515/7de1a31b/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ln_e679eb12-caaa-4d0d-b64d-b39c820c309b.png
Type: image/png
Size: 722 bytes
Desc: ln_e679eb12-caaa-4d0d-b64d-b39c820c309b.png
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20170515/7de1a31b/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tw_20cfb408-d952-4ea7-a757-a8716eaac012.png
Type: image/png
Size: 464 bytes
Desc: tw_20cfb408-d952-4ea7-a757-a8716eaac012.png
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20170515/7de1a31b/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo_eco_mail_e3e2fbdd-9cbf-4a5b-b0c1-1624e00ef4cd.jpg
Type: image/jpeg
Size: 1260 bytes
Desc: logo_eco_mail_e3e2fbdd-9cbf-4a5b-b0c1-1624e00ef4cd.jpg
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20170515/7de1a31b/attachment.jpg>


More information about the midPoint mailing list