[midPoint] Script expression in mapping & LDAP baseContext

philippebriffod at laposte.net philippebriffod at laposte.net
Thu Nov 2 16:38:17 CET 2023


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 :


<attribute id="9">
    <ref>ri:dn</ref>
    <outbound>
        <strength>strong</strength>
        <source>
            <path>$focus/employeeNumber</path>
        </source>
        <source>
            <path>$resource/connectorConfiguration/configurationProperties/baseContext</path>
        </source>
        <expression>
            <script>
                <code>'cn=' + employeeNumber + ',OU=Users,' + baseContext</code>
            </script>
        </expression>
    </outbound>
</attribute>‌
 

De : "Gustavo J Gallardo"
A : philippebriffod at laposte.net,"midPoint General Discussion"
Envoyé: jeudi 2 Novembre 2023 13:49
Objet : Re: [midPoint] Script expression in mapping & LDAP baseContext
 

Hi Philippe,
I think the right syntax would be:

 



<expression>

<script>

<code>'cn=' + employeeNumber + ',OU=Users,' + $resource/connectorConfiguration/configurationProperties/baseContext</code>

</script>

</expression>



 

 

Regards,

 

Gustavo

 


On Thu, Nov 2, 2023 at 8:26 AM Philippe via midPoint <midpoint at lists.evolveum.com> wrote:


‌Hello,

when configuring an LDAP resource we enter an LDAP DN in the parameter "baseContext"
    <connectorConfiguration >
        <icfc:configurationProperties >
...
            <gen629:baseContext>O=app21</gen629:baseContext>
...
        </icfc:configurationProperties>
    </connectorConfiguration>

when defining the mapping of the account, I would like to reuse this information for building the DN of the account

    <attribute id="9">
                <ref>ri:dn</ref>
                <outbound>
                    <strength>strong</strength>
                    <source>
                        <path>$focus/employeeNumber</path>
                    </source>
                    <expression>
                        <script>
                            <code>'cn=' + employeeNumber + ',OU=Users,' + resource.getBaseContext()</code>
                        </script>
                    </expression>
                </outbound>
    </attribute>

what is the correct expression to get the "baseContext" attribute of the resource ?

Thanks in advance
Philippe
_______________________________________________
midPoint mailing list
midPoint at lists.evolveum.com
https://lists.evolveum.com/mailman/listinfo/midpoint



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20231102/09628ee6/attachment.htm>


More information about the midPoint mailing list