I’m writing a manager correlation rule where an account attribute is multivalued. I’m fetching the first value and need to check whether the associated identity LCS is active, if yes, map to the identity else look for its manager’s LCS and assign to its manager.
Need to perform the lookup until identity with active LCS is found. Can someone help me with this usecase
Account attribute : spn_owners [multivalued]
example :
"spn_owners": [
"Priya K:e79c3f56-feba-4a45-b5d8-0f3c8f6a0040",
"Praveenkumar H:1c5af482-fe4d-4bdb-a3e9-6b04c0751102"
]
Identity attribute : objectID
example : e79c3f56-feba-4a45-b5d8-0f3c8f6a0040
here is the basic rule which i have written.
String spnType = link.getAttribute("spn_servicePrincipalType");
String spnOwners = link.getAttribute("spn_owners");
String finalValue = "";
Map returnMap = new HashMap();
if(spnType != null && spnType == "Application){
if((spnOwners != null) && (spnOwners.size() > 0)){
if(spnOwners.contains(":")){
finalValue= spnOwners.substring(spnOwners.lastIndexOf(":"),spnOwners.length());
}
}
}
finalValue=finalValue.trim();
returnMap.put( "identityAttributeName", "trFedrampObjectid");
returnMap.put( "identityAttributeValue", finalValue );
return returnMap;
Just a modified version of your snippet with assumption that you are using cloud rule and username is being kept in your multi valued attribute and lifecycle state is as I named it. Similarly you may change it depending upon your use case.