Query on IdnRuleUtil (CountSearchableIdentity)

Hi All,

I’ve Query when we use below method to get no of identities that exists in tenant, If I’m passing attributeName as uid (searchable attribute) and operation “Equals” and Value (I’m getting user’s uid and passing here).

Method:
public int countIdentitiesBySearchableIdentityAttribute(String attributeName, String operation, String value)

example snippet:
String hasUidAttribute = identity.getAttribute("uid");
        String hasUid = hasUidAttribute != null ? hasUidAttribute.trim() : null;

        int count = idn.countIdentitiesBySearchableIdentityAttribute("uid", "Equals", hasUid);

Does this uid whatever I’m passing will also take count as its therein tenant we’re just passing it as input, hence default count value would be 1?

Can anyone enlighten this query?

Thanks!

I cannot state for certain, but I’d imagine you are are correct that the current identity will be a part of the count. The method has no context of the identity you are using and will search ALL of the tenant for that value. Therefore default would be 1.

1 Like

Hi @Braden,

Noted with thanks!

1 Like

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