<html><body>Hi Oskar, all,<div><br></div><div>Yes i tryed this, but it didnt work. with that code:</div><div><br></div><div><div>            <code></div><div><span style="white-space:pre">            </span>   import com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentType;</div><div><span style="white-space:pre">              </span>   import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType;</div><div><span style="white-space:pre">         </span>   import com.evolveum.midpoint.xml.ns._public.common.common_3.RoleType;</div><div><span style="white-space:pre">            </span>   import com.evolveum.midpoint.xml.ns._public.common.common_3.OrgType;</div><div><span style="white-space:pre">             </span>   import java.util.*;</div><div><span style="white-space:pre">              </span>   </div><div><span style="white-space:pre">         </span>   log.warn("XXX assigning from SAP role {}" , ADGroup)</div><div><span style="white-space:pre">           </span>   if (ADGroup != null){</div><div><span style="white-space:pre">                            </span>orgName = ADGroup;</div><div><span style="white-space:pre">                    </span>    </div><div>                org = midpoint.searchObjectByName(RoleType.class, orgName);</div><div>                if (org != null)</div><div>                {</div><div>                    log.info("org {}" , org)</div><div>                    orgOrt = new ObjectReferenceType();</div><div><span style="white-space:pre">                   </span>        orgOrt.setOid(org.getOid());</div><div><span style="white-space:pre">                      </span>        orgOrt.setType(RoleType.COMPLEX_TYPE);</div><div><br></div><div><span style="white-space:pre">                   </span>        AssignmentType assignment = new AssignmentType();</div><div><span style="white-space:pre">                 </span>        assignment.asPrismContainerValue()</div><div><span style="white-space:pre">                        </span>        assignment.setTargetRef(orgOrt);</div><div><span style="white-space:pre">                  </span>        return assignment</div><div><span style="white-space:pre">                 </span>    }</div><div><span style="white-space:pre">               </span>   }</div><div><span style="white-space:pre">                </span>   </code></div></div><div><br></div><div>I got error:</div><div><br></div><div><div><br></div><div><dt style="box-sizing:border-box;line-height:1.42857;font-weight:700;float:left;width:100px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap;color:rgb(51,51,51);font-family:'Source Sans Pro','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px">Operation</dt><dd style="box-sizing:border-box;line-height:1.42857;margin-left:130px;word-break:break-word;color:rgb(51,51,51);font-family:'Source Sans Pro','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px"><span style="box-sizing:border-box;font-weight:700">Reconcile user (Gui): {0}</span></dd><dt style="box-sizing:border-box;line-height:1.42857;font-weight:700;float:left;width:100px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap;color:rgb(51,51,51);font-family:'Source Sans Pro','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px">Message</dt><dd style="box-sizing:border-box;line-height:1.42857;margin-left:130px;word-break:break-word;color:rgb(51,51,51);font-family:'Source Sans Pro','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px">Couldn't reconcile user user:08c284d4-8bc8-4b1a-a598-785773c51d62(ales.levinsky).</dd><dd style="box-sizing:border-box;line-height:1.42857;margin-left:130px;word-break:break-word;color:rgb(51,51,51);font-family:'Source Sans Pro','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px"><table style="box-sizing:border-box;border-spacing:0px;border-collapse:collapse;background-color:transparent;border:0px"></table></dd><dd style="box-sizing:border-box;line-height:1.42857;margin-left:130px;word-break:break-word;color:rgb(51,51,51);font-family:'Source Sans Pro','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px"><table style="box-sizing:border-box;border-spacing:0px;border-collapse:collapse;background-color:transparent;border:0px"></table></dd><dt style="box-sizing:border-box;line-height:1.42857;font-weight:700;float:left;width:100px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap;color:rgb(51,51,51);font-family:'Source Sans Pro','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px">Error</dt><dd style="box-sizing:border-box;line-height:1.42857;margin-left:130px;word-break:break-word;color:rgb(51,51,51);font-family:'Source Sans Pro','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px">groovy.lang.MissingMethodException: No signature of method: org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.If() is applicable for argument types: (java.lang.Boolean, Script31$_run_closure1) values: [true, Script31$_run_closure1@2eb5683] Possible solutions: find(), any(), is(java.lang.Object), wait(), dump(), grep() in expression in mapping in inbound expression for {http://midpoint.evolveum.com/xml/ns/public/resource/instance-3}memberOf in resource:746ecf5e-3e8c-11e6-b2f9-3c970e44b9e2(BLUED (LDAP))({.../common/common-3}input=CN=POS_AX_ADMINS,OU=Groups,OU=CZ,DC=domain,DC=local; ) in expression in mapping in inbound expression for {http://midpoint.evolveum.com/xml/ns/public/resource/instance-3}memberOf in resource:746ecf5e-3e8c-11e6-b2f9-3c970e44b9e2(BLUED (LDAP))</dd></div></div><div><br></div><div>Any idea? I fouind some things on internet about bug in groovy. But without solution for now.</div><div><br></div><div>Jan</div><div><br></div><div><br></div><div><dd style="box-sizing:border-box;line-height:1.42857;margin-left:130px;word-break:break-word;color:rgb(51,51,51);font-family:'Source Sans Pro','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px"><br></dd><dd style="box-sizing:border-box;line-height:1.42857;margin-left:130px;word-break:break-word;color:rgb(51,51,51);font-family:'Source Sans Pro','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px"><br></dd></div></body></html>