# How to query all the application accounts from an application in IIQ

**URL:** <https://community.sailpoint.com/discuss/t/how-to-query-all-the-application-accounts-from-an-application-in-iiq/36199>\
**Category:** Implement & Extend\
**Tags:** identityiq, identityiq-8.4\
**Created:** [May 15, 2025, 8:36pm UTC](https://community.sailpoint.com/discuss/t/how-to-query-all-the-application-accounts-from-an-application-in-iiq/36199 "2025-05-15T20:36:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![magesh\_narayanan](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@magesh\_narayanan](https://community.sailpoint.com/discuss/u/magesh_narayanan)\
**Post date:** [May 15, 2025, 8:36pm UTC](https://community.sailpoint.com/discuss/t/how-to-query-all-the-application-accounts-from-an-application-in-iiq/36199/1 "2025-05-15T20:36:23Z")

</div>

Hello All.

Can someone help me with a search query that returns all the application accounts from an application in Identity IQ?

Thanks

---

<div class="post-metadata">

**Author:** ![ed\_miller](https://sea3.discourse-cdn.com/sailpoint2/discuss/user_avatar/community.sailpoint.com/ed_miller/32/17615_2.png) [@ed\_miller](https://community.sailpoint.com/discuss/u/ed_miller)\
**Post date:** [May 15, 2025, 10:13pm UTC](https://community.sailpoint.com/discuss/t/how-to-query-all-the-application-accounts-from-an-application-in-iiq/36199/2 "2025-05-15T22:13:04Z")

</div>

What is your objective? You can find all identies with entitlements on an application by searching in the entitlement catalog, and there is a built-in report that lists identies and their entitlements on an application. But it sounds like you want to know all accounts regardless of entitlements. You might have to go directly to the application for that. What is your goal?

---

<div class="post-metadata">

**Author:** ![Sarat0503](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@Sarat0503](https://community.sailpoint.com/discuss/u/Sarat0503)\
**Post date:** [May 16, 2025, 1:25am UTC](https://community.sailpoint.com/discuss/t/how-to-query-all-the-application-accounts-from-an-application-in-iiq/36199/3 "2025-05-16T01:25:05Z")

</div>

Hello&nbsp; @magesh_narayanan

Below code can get you links of a specific application:

```java
QueryOptions qo = new QueryOptions();

qo.add(Filter.eq("application.name", "{Your Application Name Here}"));

IncrementalObjectIterator iterator = new IncrementalObjectIterator(context, Link.class, qo);

while (iterator.hasNext()) {

 Link link = (Link) iterator.next();

// Write your logic here

 }

```
