<div style="font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#00000">Thank you for you quick answer. I got an error with your proposal (4.8 version) but it help me and I found a working syntax :<br>
<br>
<br>
<attribute id="9"><br>
    <ref>ri:dn</ref><br>
    <outbound><br>
        <strength>strong</strength><br>
        <source><br>
            <path>$focus/employeeNumber</path><br>
        </source><br>
        <source><br>
            <path>$resource/connectorConfiguration/configurationProperties/baseContext</path><br>
        </source><br>
        <expression><br>
            <script><br>
                <code>'cn=' + employeeNumber + ',OU=Users,' + baseContext</code><br>
            </script><br>
        </expression><br>
    </outbound><br>
</attribute>‌</div>
 

<div class="gl_quote" style="margin-top: 20px; padding-top: 5px;">De : "Gustavo J Gallardo"<br>
A : philippebriffod@laposte.net,"midPoint General Discussion"<br>
Envoyé: jeudi 2 Novembre 2023 13:49<br>
Objet : Re: [midPoint] Script expression in mapping & LDAP baseContext<br>
 
<div class="gl_quoted">
<div dir="ltr">Hi Philippe,
<div>I think the right syntax would be:</div>

<div> </div>

<div>
<div style="color:rgb(204,204,204);background-color:rgb(31,31,31);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;line-height:18px;white-space:pre">
<div><span style="color:rgb(128,128,128)"><</span><span style="color:rgb(86,156,214)">expression</span><span style="color:rgb(128,128,128)">></span></div>

<div><span style="color:rgb(128,128,128)"><</span><span style="color:rgb(86,156,214)">script</span><span style="color:rgb(128,128,128)">></span></div>

<div><span style="color:rgb(128,128,128)"><</span><span style="color:rgb(86,156,214)">code</span><span style="color:rgb(128,128,128)">></span><span style="color:rgb(212,212,212)">'cn=' + employeeNumber + ',OU=Users,' + <strong>$resource/connectorConfiguration/configurationProperties/baseContext</strong></span><span style="color:rgb(128,128,128)"></</span><span style="color:rgb(86,156,214)">code</span><span style="color:rgb(128,128,128)">></span></div>

<div><span style="color:rgb(128,128,128)"></</span><span style="color:rgb(86,156,214)">script</span><span style="color:rgb(128,128,128)">></span></div>

<div><span style="color:rgb(128,128,128)"></</span><span style="color:rgb(86,156,214)">expression</span><span style="color:rgb(128,128,128)">></span></div>
</div>
</div>

<div> </div>

<div> </div>

<div>Regards,</div>

<div> </div>

<div>Gustavo</div>
</div>
 

<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">On Thu, Nov 2, 2023 at 8:26 AM Philippe via midPoint <<a href="mailto:midpoint@lists.evolveum.com">midpoint@lists.evolveum.com</a>> wrote:</div>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="font-family:Arial,Helvetica,sans-serif;font-size:12px">‌Hello,<br>
<br>
when configuring an LDAP resource we enter an LDAP DN in the parameter "baseContext"<br>
    <connectorConfiguration ><br>
        <icfc:configurationProperties ><br>
...<br>
            <gen629:baseContext>O=app21</gen629:baseContext><br>
...<br>
        </icfc:configurationProperties><br>
    </connectorConfiguration><br>
<br>
when defining the mapping of the account, I would like to reuse this information for building the DN of the account<br>
<br>
    <attribute id="9"><br>
                <ref>ri:dn</ref><br>
                <outbound><br>
                    <strength>strong</strength><br>
                    <source><br>
                        <path>$focus/employeeNumber</path><br>
                    </source><br>
                    <expression><br>
                        <script><br>
                            <code>'cn=' + employeeNumber + ',OU=Users,' + resource.getBaseContext()</code><br>
                        </script><br>
                    </expression><br>
                </outbound><br>
    </attribute><br>
<br>
what is the correct expression to get the "baseContext" attribute of the resource ?<br>
<br>
Thanks in advance<br>
Philippe</div>
_______________________________________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br>
<a href="https://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">https://lists.evolveum.com/mailman/listinfo/midpoint</a></blockquote>
</div>
</div>
</div>