first of all, i have 2 questions:
1-> why you declare lcs variable if you dont use it?
2-> why don’t you put the in the filter the status check? (you can use the inactive attribute too)
Later, the problem is putting all the identity with this conditions in the map.
This rule will be execute for every account, so every time you return a list of identities.
Hi @zeel_sinojia,
Are you getting multiple identities with email query option please check if you have multiple identities with same email check this via adv analytics. If that’s the case add more filters where you get unique identity object.
I’ll add the status as a filter in the query options.
I am putting all the identities in a map, it is not getting returned as a Map with keys as string and values as list. I also added a log to see what is actually getting returned for every account.
There are identities with same email. However, that’s the reason I am fetching a list of objects instead of fetching a unique one. Once I get that list, I’ll iterate over it and the first match I get, I am returning that Identity.
If you have enable the options then it should have aggregated all users and fixed the issue. Can you try enabling the aggregation logs and verify for the uncorrelated accounts.
An update on this, the logic written here was correct. However it was still not getting correlated. I am not sure what was the reason but we tried running the same piece of code in another environment and it worked. I am not sure what’s the correct answer here but it worked in higher environment. Thank you all for your responses!
Hi @zeel_sinojia,
In the worst case you could have deleted all the uncorrelated accounts and rerun the correlation logic via aggregation which would have correlated the accounts.