Hi @rishavghoshacc , everything looks fine, you’re just returning mgrId instead of the map (returnMap). Swap that last line to return returnMap; and it should populate.
The issue mgrId is declared inside the if block, but you return mgrId; outside it — that scope alone will throw a compile/runtime error, meaning the rule fails and no manager gets. and also other thingthis rule type expects you to return the manager’s identity name (String), not an Identity object or the returnMap.
Try below:
Move the return inside the if block so it only returns when mgrId actually exists.
Return xxxxame (the manager’s identity name string) instead of mgrId.
Add an else (or fallback) to return null when the attribute is missing, so it doesn’t fall through undefined.
@rishavghoshacc does every account on that application actually have "- " in the manager attribute?
split("- ")[1] throws an ArrayIndexOutOfBoundsException on any value that doesn’t have that exact format or ending right after the dash. Accounts with no manager value at all are fine, those get skipped. But during Identity Refresh that exception can kill the whole refresh worker thread. One bad row out of a few thousand accounts is enough to make it look like the rule never works at all.
Guard it :
import java.util.HashMap;
import java.util.Map;
Map returnMap = new HashMap();
Object rawMgr = link.getAttribute("xxxxger");
if (rawMgr != null) {
String[] parts = rawMgr.toString().split("- ", 2);
if (parts.length > 1 && parts[1].trim().length() > 0) {
returnMap.put("identityName", parts[1].trim());
} else {
log.error("MGRCORR: manager value not in expected format: [" + rawMgr + "]");
}
} else {
log.error("MGRCORR: manager attribute is null for link " + link.getNativeIdentity());
}
return returnMap;
Can you drop this in, rerun the Identity Refresh, and share what comes up? Specifically, check whether the MGRCORR log fires and what value you’re getting for the parsed manager. Also confirm that the parsed value actually matches the manager’s Identity name in IIQ. That should tell us pretty quickly whether the parsing/correlation is the problem or if we need to look somewhere else.
You can use this rule and add the attribute to the Identity Mapping (Manager attribute). Then perform an Identity Refresh and let me know. I created this rule based on the rule I already have.
Hello Rishav. I would check both the rule return and the Manager configuration.
In IIQ, a Manager Correlation rule should return a Map. Your returnMap.put("identity", mgrId) approach is valid, but returning mgrId directly is not. If the value after "- " is the manager’s IIQ Identity name, you can simplify the rule to:
Map returnMap = new HashMap();
Object rawMgr = link.getAttribute("xxxxger");
if (rawMgr != null) {
String[] parts = rawMgr.toString().split("- ", 2);
if (parts.length == 2 && parts[1].trim().length() > 0) {
returnMap.put("identityAttributeName", "name");
returnMap.put("identityAttributeValue", parts[1].trim());
}
}
return returnMap;
Also verify:
Global Settings → Identity Mappings → Manager is configured correctly.
The parsed manager value exactly matches an existing Identity name.
After aggregation, run Identity Refresh with Refresh identity attributes and Refresh manager status enabled.
If you are testing the same unchanged manager data repeatedly, IIQ may skip manager correlation. In that case, test with alwaysRefreshManager=true.