FR IDM – manager context during implicit sync transformation script

This topic has 0 replies, 1 voice, and was last updated 5 months, 2 weeks ago by akumar101.

  • Author
  • #28530


    I need to populate manager attribute in target ldap in DN format. I’ve written a small groovy script for the transformation.

    source: “manager”

    if (source != null) {
    logger.trace(“Source is :::: (1)” + source)

    String idmFilter = “/_id eq \”” + source._refResourceId + “\””

    def idmManagerObj = openidm.query(“managed/user”, [“_queryFilter”: idmFilter], [“userName”])
    if (idmManagerObj.resultCount == 1) {“Manager found :::: (2)” + idmManagerObj.result[0].userName)

    Error in logs:
    WARNING: Property mapping /manager transformation script encountered exception
    org.forgerock.openidm.script.ScriptThrownException: Cannot get property ‘userName’ on null object in file:/opt/openidm/script/ImplicitManager.groovy
    at org.forgerock.openidm.script.groovy.GroovyScript.eval(
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

    Any pointers will be greatly appreciated.


Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

©2021 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?