Unable to get Account Attribute of Another Application in AttributeGenerator Rule of AD

I need to generate value of an attribute of AD on the basis of an account attribute of other application. I tried using idn rule library methods in my AttributeGenerator rule but I keep getting null. Here is the code I am running:
Account appAAccount = idn.getAccountByNativeIdentity(“AppA”, sAMAccountName);

As per logs, sAMAccountName is fine. But Account comes as null. I also tried getRawAccountAttribute() method and it also return null.

I am not sure what I am doing wrong. Has anybody ever used these methods? Any pointers will be highly appreciated.

hi @nazampreetkaur

Have you checked if sAMAccountName attribute is configured as Account ID? By defaut distinguisedName attribute is the nativeIdentity in Active Directory connector

If it is not possible retrieve account using the method mentioned before, you can try the following method:

Account     getAccountByDisplayName(java.lang.String applicationName, java.lang.String displayName)

with following params:

Account appAAccount = getAccountByDisplayName("AppA", sAMAccountName);

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.