Search by custom attributes with limitations

Hi,

Given not all the fields are searchable, if I want to list all the accounts with Source.name eq ‘ABC’ and customattribute_01 of that Source eq ‘value01’, what is the easiest way to achieve it

Hi @lalithajay

As far as I know, there’s no way to achieve this using a single API call or using search. A custom script would need to be made to pull these accounts.

I think the easiest approach in pseudo code would be the following:

  1. Run the regular accounts API url using your first filter: source.displayableName eq "ABC"
  2. Once you have these accounts, loop through them and check the attributes.customattribute_01 for the value you’re looking for and if it has that value, save that row to a file or final list.
  3. Export the final list and/or send that data via email.

If you need help with the code, please let me know :slight_smile:

Thanks, that is what I am planning to do,

Just a side question, if the relevant account attribute is also available as an Identity attribute, then we should be able to use ?

I can see that in the UI search this is possible, but by looks API end point {{baseUrl}}/accounts/

only can have limited attributes in the search

Is this something you can shed some light?

That’s correct. If you make the attribute an identity attribute, you can utilize the search API to pull the report, but this will only pull the identities, not the accounts. Search doesn’t show accounts, only identities.

If you need the actual accounts, then the only option is what I mentioned before.

Thanks Tyler, makes sense, am into the API and doing the filtering

Sounds good! Let me know if there’s anyway I can help.

in the search endpoint, can’t we use ‘accountactivities’ with ‘query’ to get account changes?

Correct, you can get account requests in that field, this only shows the changes to accounts though. It doesn’t guarantee every account from that source will have an entry in there.

Thanks my main target is to get Accounts modified after date1 etc. for specific Source.name say ‘Source001’

but would be even ideal, to filter further with IdentityLifeCycle either ‘LC1’ or ‘LC2’ in same filter

currently I can get these via below, but would be good to have further things in the filter so that less records

{{baseUrl}}/accounts?filters=modified gt 2026-03-18T23:05:55Z and source.name eq “Source001”

but unfortunately I cannot use IdentityLifeCycle in above query, so I am checking any better to achieve it, hence question on accountactivities etc via search API,

Ah I see. Unfortunately, I still don’t think you’ll be able to query on the LCS state in the search query. The account Activity doesn’t have the option to filter on that field as far as I know. The best I think you can get is something like this in search, which I don’t think is much better than your API call to the accounts endpoint:

sources:"IdentityNow" AND created:[2026-02-01 TO now]