# How can we do account/Group aggregation using a custom rule

**URL:** <https://developer.sailpoint.com/discuss/t/how-can-we-do-account-group-aggregation-using-a-custom-rule/92848>\
**Category:** IIQ Discussion and Questions\
**Tags:** identityiq, aggregation\
**Created:** [December 10, 2024, 8:38am UTC](https://developer.sailpoint.com/discuss/t/how-can-we-do-account-group-aggregation-using-a-custom-rule/92848 "2024-12-10T08:38:58Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shalaka\_Gawande](https://avatars.discourse-cdn.com/v4/letter/s/a6a055/32.png) [@Shalaka\_Gawande](https://developer.sailpoint.com/discuss/u/Shalaka_Gawande)\
**Post date:** [December 10, 2024, 8:38am UTC](https://developer.sailpoint.com/discuss/t/how-can-we-do-account-group-aggregation-using-a-custom-rule/92848/1 "2024-12-10T08:38:58Z")

</div>

## Which IIQ version are you inquiring about?

_[IIQ8.3]_

## Share all details about your problem, including any error messages you may have received.

_[I want to aggregate the accounts in IIQ without using account aggregation task,by implementing a custom rule so how can we achieve this in IIQ?]_

---

<div class="post-metadata">

**Author:** ![kumar\_priya](https://avatars.discourse-cdn.com/v4/letter/k/6bbea6/32.png) [@kumar\_priya](https://developer.sailpoint.com/discuss/u/kumar_priya)\
**Post date:** [December 10, 2024, 8:43am UTC](https://developer.sailpoint.com/discuss/t/how-can-we-do-account-group-aggregation-using-a-custom-rule/92848/2 "2024-12-10T08:43:10Z")

</div>

Any reason behind that to aggregate users without account aggregation ?

---

<div class="post-metadata">

**Author:** ![Shalaka\_Gawande](https://avatars.discourse-cdn.com/v4/letter/s/a6a055/32.png) [@Shalaka\_Gawande](https://developer.sailpoint.com/discuss/u/Shalaka_Gawande)\
**Post date:** [December 10, 2024, 8:47am UTC](https://developer.sailpoint.com/discuss/t/how-can-we-do-account-group-aggregation-using-a-custom-rule/92848/3 "2024-12-10T08:47:18Z")

</div>

There is a requirement like that so I am trying.

---

<div class="post-metadata">

**Author:** ![AroraA3](https://avatars.discourse-cdn.com/v4/letter/a/3bc359/32.png) [@AroraA3](https://developer.sailpoint.com/discuss/u/AroraA3)\
**Post date:** [December 10, 2024, 8:54am UTC](https://developer.sailpoint.com/discuss/t/how-can-we-do-account-group-aggregation-using-a-custom-rule/92848/4 "2024-12-10T08:54:06Z")

</div>

Is this for complete aggregation or single object?

---

<div class="post-metadata">

**Author:** ![Shalaka\_Gawande](https://avatars.discourse-cdn.com/v4/letter/s/a6a055/32.png) [@Shalaka\_Gawande](https://developer.sailpoint.com/discuss/u/Shalaka_Gawande)\
**Post date:** [December 10, 2024, 8:58am UTC](https://developer.sailpoint.com/discuss/t/how-can-we-do-account-group-aggregation-using-a-custom-rule/92848/5 "2024-12-10T08:58:24Z")

</div>

Complete aggregation.

---

<div class="post-metadata">

**Author:** ![sukarande](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@sukarande](https://developer.sailpoint.com/discuss/u/sukarande)\
**Post date:** [December 10, 2024, 10:30am UTC](https://developer.sailpoint.com/discuss/t/how-can-we-do-account-group-aggregation-using-a-custom-rule/92848/6 "2024-12-10T10:30:09Z")

</div>

Through custom rule focus on to pull all users and then you can call account aggregation API.

---

<div class="post-metadata">

**Author:** ![ashutosh08](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/ashutosh08/32/11459_2.png) [@ashutosh08](https://developer.sailpoint.com/discuss/u/ashutosh08)\
**Post date:** [December 10, 2024, 2:02pm UTC](https://developer.sailpoint.com/discuss/t/how-can-we-do-account-group-aggregation-using-a-custom-rule/92848/7 "2024-12-10T14:02:46Z")

</div>

Hi @Shalaka_Gawande,

You can use below snippet to reconcile data and with the below snippet you will get ResourceObject. Let me know if you need further help.

```auto
ConnectorFactory cf=new ConnectorFactory();
    Application app=context.getObjectByName(Application.class,"appName");

    Connector conn=ConnectorFactory.getConnector(app, null);

    CloseableIterator iterator=conn.iterateObjects("account", null, null);
    while(iterator.hasNext())
    {

      ResourceObject object=iterator.next();
      System.out.println("object ::"+object.toXml());
    }

```

Thanks

---

<div class="post-metadata">

**Author:** ![Shalaka\_Gawande](https://avatars.discourse-cdn.com/v4/letter/s/a6a055/32.png) [@Shalaka\_Gawande](https://developer.sailpoint.com/discuss/u/Shalaka_Gawande)\
**Post date:** [December 10, 2024, 2:15pm UTC](https://developer.sailpoint.com/discuss/t/how-can-we-do-account-group-aggregation-using-a-custom-rule/92848/8 "2024-12-10T14:15:45Z")

</div>

Thanks! @ashutosh08.  
I will try.

---

<div class="post-metadata">

**Author:** ![gaurav\_khandelwal](https://avatars.discourse-cdn.com/v4/letter/g/e36b37/32.png) [@gaurav\_khandelwal](https://developer.sailpoint.com/discuss/u/gaurav_khandelwal)\
**Post date:** [December 10, 2024, 6:08pm UTC](https://developer.sailpoint.com/discuss/t/how-can-we-do-account-group-aggregation-using-a-custom-rule/92848/9 "2024-12-10T18:08:27Z")

</div>

If its for all users you can launch the aggregation task from your rule. This will be easier to handle

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [February 8, 2025, 6:08pm UTC](https://developer.sailpoint.com/discuss/t/how-can-we-do-account-group-aggregation-using-a-custom-rule/92848/10 "2025-02-08T18:08:28Z")

</div>

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