Issue with getAccountByDisplayName() method in Identity Attribute rule

Hi Team,

We are using getAccountByDisplayName to get the account in the IdentityAttribute rule. IdentityNow is not able to search the account even though the account is present.
The search which I am performing is on a source who has all its account in uncorrellated state. So my question is does the getAccountByDisplayName does not get accounts from a source which are not correlated to an identity ?

Has anyone worked on this method and give us some pointer and directions?

Thanks
Rakesh Bhati

What value are you passing for the Display Name when calling this method?

Hi Nithesh,
I am passing the value of the attribute which is marked as Account Name in the source

Thanks

But you mentioned all accounts are uncorrelated. How are you able to refer to an account from the identity?

Hi Nithesh,
We have a source which contains Historical Records of samAccountname. I have aggregated all the accounts in IdentityNow and they are in uncorrealted state. We have written an Attribute Generator Rule in which I have a logic to check if user is rehire if he is then i go and check this source using the below method.
getAccountByDisplayName(Applicationname,accoutName) … the account name in this is nothing but the employee number we get in the attribute generator rule. Now when i execute the logic it is returning null and that is why wanted to know if we can do a search using getAccountByDisplayName() ?

1 Like

Can you please share the line for this in your code?

sailpoint.rule.Account account=idn.getAccountByDisplayName(“ApplicationName”, “displayName”);
if(account!=null)
{
Map acctAttrs = account.getAttributes();
if(acctAttrs!=null)
{
extSamAccountName = (String) acctAttrs.get(“ext_samAccount”);
return extSamAccountName;
}
}

How is ApplicationName formatted in this? "Source Name [source]"?

Yes Nithesh tried both “Source Name [source]” and “Source Name” but it still gets null not sure why. I am not sure what I am missing :frowning:

1 Like

Hi Team,
Just to update we can do a serach on uncorreated accounts as well. The issue was with the source not sure why it was not able to search. I did create a new source with different name and tried in the cloud rule and it worked :).

1 Like

@RAKGDS We are facing a similar issue. Is it a source issue or applicationName have typo? Will try to delete and recreate the source. . .

Based on some similar experience my opinion is that if you had changed the name of the source, IDN still expects the old name to be used in the rule.

I think there is some issue with the Webservice connector what I have seen. If you change the settings like account I’d or operation it does behave cranky and we need to recreate the source. I had done the same thing
@iamnithesh yes we did had renamed the source but I did try with old name as well it still did not work

Thanks
Rakesh Bhati

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