idn.attrSearchCountAccounts not returning result

Hi,

I am trying to create a function using idn.attrSearchCountAccounts BUT i am having issue where the function is not able to search identity uid against the account’s attribute “nric_fin”

Not sure where I am missing out. Based on (Using IDNRuleUtil as a Wrapper for Common Rule Operations | SailPoint Developer Community). It did mentioned “searchable account attribute” for this function. Not sure if there is a limitation in search for certain attribute or I need to have perform extra steps like making an attribute searchable in IDN?

public boolean isAccountExists(String searchValue, String appName) {
        List SOURCE_IDS = new ArrayList(Arrays.asList(new String[]{appName}));
        String SEARCH_OP = "Equals";
        List SEARCH_VALUES = new ArrayList(Arrays.asList(new String[]{searchValue}));
        int count = 0;
        count = idn.attrSearchCountAccounts(SOURCE_IDS, "nric_fin", SEARCH_OP, SEARCH_VALUES);

        if(count > 0){
            log.error(KEY_LOGGER_STR + "isAccountExists() returning true");
            return true;
        }else{
            log.error(KEY_LOGGER_STR + "isAccountExists() returning false");
            return false;
        }
    }
1 Like

Hi Joshua,
Based on documentation it seems that SOURCE_IDS should contain IDs of the APP not APP Name itself.


also
SEARCH_OP should be Operation.Equals instead of string value.

And the last thing - if you go to correlation config - you’ll see all searchable attributes because they can be used for correlation. If you can’t see your attribute there you have to make it searchable via the api following this post

Hi Kamil,

You are right. the attribute is not a searchable attribute in my case. Its work after create the searchable attribute via API

1 Like

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