Query Filter to list out the accounts

Hello,

I am creating a query to list out the users without Active Active Directory account but getting error " could not resolve property: application of: sailpoint.object."

import sailpoint.object.*;
  import sailpoint.object.Identity;
  import sailpoint.object.Application;
  import sailpoint.object.Rule;    
  import java.util.List;
  import java.util.ArrayList;
  import java.util.Arrays;
  import sailpoint.tools.Util;
  import sailpoint.object.Link;
  import sailpoint.object.Filter;
  import sailpoint.object.QueryOptions;
  import java.util.Iterator;
  

QueryOptions qo = new QueryOptions();
qo.addFilter(Filter.ne("application.name","Active Directory"));
List list = context.getObjects(Identity.class,qo);
return list;

Hi @j1241,

because the identity object dont have a direct link with application, Links have it.

Try with this:

qo.addFilter(Filter.ne("links.application.name","Active Directory"));

Hello @enistri_devo
It worked for me. So, this gives me both Active and Disabled Active Directory Account.
Is there a way to get only Active Accounts ?

try to add to the filter:

Filter.eq(“links.inactive”,“false”)