[midPoint] extension/property mapping in user template

Vladislavs Filipciks vladislavs.filipciks at csolutions.lv
Wed Apr 8 16:34:44 CEST 2020


Hello. 

I'm having trouble mapping user extended schema property to another extended schema property during user import from resource. The source extension/property is always being null while object template is processed. 
Probably I'm missing some additional config or something. Could any one suggest/correct me? Config snips: 

Resource: 
< attribute > 
< ref > ri:memberOf </ ref > 
< inbound > 
< expression > 
< script > 
< code > 
if(input != null){ 
tmpdn = input; 
groupPath = tmpdn.substring(0, tmpdn.indexOf(",DC=")); 
log.info("-- adGroup from resource schemaHandling " + groupPath ); 
return groupPath; 
} 
</ code > 
</ script > 
</ expression > 
< target > 
< path > extension/adGroup </ path > 
</ target > 
</ inbound > 
</ attribute > 

Extension schema: 

< xsd:complexType name = "UserExtensionType" > 
< xsd:annotation > 
< xsd:appinfo > 
< a:extension ref = "c:UserType" /> 
</ xsd:appinfo > 
</ xsd:annotation > 
< xsd:sequence > 

User template that is being used with sync: 

< mapping > 
< name > Ad Group name mapping </ name > 
< source > 
< path > extension/adGroup </ path > 
</ source > 
< expression > 
< script > 
< code > 
log.info('+++++++++++++++++ adGroup from user template ' + adGroup); 
if ((groupName = adGroup.split(",CN=")[0].substring(3))){ 
return groupName.trim(); 
} 
groupName = adGroup.split(",OU=")[0].substring(3); 
log.info('++++++ gorupName from user template ' + groupName); 
return groupName.trim(); 
</ code > 
</ script > 
</ expression > 
< target > 
< path > extension/groupName </ path > 
</ target > 
</ mapping > 

Log: 

2020-04-08 17:31:28,495 [MODEL] [http-nio-8080-exec-4] INFO (com.evolveum.midpoint.expression): -- adGroup from resource schemaHandling CN=Midpoint Test Group,OU=Midpoint Test OU,OU=CS_group_users 
2020-04-08 17:31:28,496 [MODEL] [http-nio-8080-exec-4] INFO (com.evolveum.midpoint.expression): -- adGroup from resource schemaHandling CN=Domain Admins,CN=Users 
2020-04-08 17:31:28,500 [MODEL] [http-nio-8080-exec-4] INFO (com.evolveum.midpoint.expression): -- adOUContainer from resource schemaHandling OU=Midpoint Test OU,OU=CS_group_users 
2020-04-08 17:31:28,515 [MODEL] [http-nio-8080-exec-4] INFO (com.evolveum.midpoint.expression): +++++++++++++++++ adGroup from user template null 





Vladislavs Fiļipčiks 



+371 6784 7766 



SIA “Corporate Solutions” 

Pērnavas 43A-9, Rīga, LV-1009 

[ http://www.csolutions.lv/ | www.csolutions.lv ] 





Šis e-pasts un tā pielikumā esošie dokumenti var saturēt ierobežotas pieejamības informāciju, cita starpā fizisko personu datus, kas adresēta tikai tā saņēmējam un izmantojama tikai leģitīmiem mērķiem. Ja esat saņēmis šo e-pastu kļūdas dēļ, vai nav pamatota mērķa ierobežotas pieejamības informācijas, cita starpā fizisko personu datu, apstrādei, Jums nav tiesību izmantot vai pārsūtīt šajā e-pastā un tam pievienotajos dokumentos ietverto informāciju. Šādā gadījumā nekavējoties neatgriezeniski izdzēsiet šo e-pastu. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20200408/25f3f157/attachment.htm>


More information about the midPoint mailing list