Report Filter Join Identity and Link Object

Hi,

Good day!

I am trying to create a custom report with Filter type of Data source.

I am facing issues with joining identity and link object.

The report return 0 objects which is not true, there are objects that match the criteria.

Criteria is to get all identities of typexxx which are inactive, have disabled account: AppXYX and have accountAttributeXYZNamevalue as xyzValue.

I have made the account attribute searchable and it works fine if i just add Link filter.

Can anyone check and let me know what is wrong with this filter and how i can fix it?

Below is my data source code,

<DataSource objectType=“Identity” type=“Filter”>
<QueryParameters>
<Parameter argument=“id” property=“Identity.id”>
<QueryScript>
<Source>

import sailpoint.object.*;
import sailpoint.reporting.*;

QueryOptions qo = new QueryOptions();

qo.addFilter(Filter.join(“id”,“Link.identity.id”));
qo.addFilter(Filter.eq(“inactive”,true));
q0.addFilter(Filter.eq(“type”,“xxx”));

qo.addFilter(Filter.eq(“Link.iiqDisabled”,true));
qo.addFilter(Filter.eq(“Link.application.name”,“AppXYX”));
qo.addFilter(Filter.eq(“Link.accountAttributeXYZName”,“xyzValue”));

return qo;

</Source>
</QueryScript>
</Parameter>
<Parameter argument=“identities” property=“id”/>
</QueryParameters>
</DataSource>

Thank You!

Hi  @Aishwarya_BM ,   Please try the below query and remove the <Parameter argument=“identities” property=“id”/> line.

import sailpoint.object.QueryOptions;
import sailpoint.object.Filter;
import sailpoint.object.Link;

QueryOptions qo= new QueryOptions();

Filter f=Filter.subquery(“id”, Link.class, “identity.id”, Filter.and(Filter.eq(“IIQDisabled”, “true”),
Filter.eq(“name”, “AppXYX”), Filter.eq(“accountAttributeXYZName”, “zzz”)));

qo.addFilter(f);

qo.addFilter(Filter.eq(“inactive”,true));
qo.addFilter(Filter.eq(“type”,“xxx”))

return qo;

Thanks  @Vaishali_Hebbar  for the post.

I was successfully able to join both tables and query the objects with subquery method.