# Workflow loop inside loop?

**URL:** <https://developer.sailpoint.com/discuss/t/workflow-loop-inside-loop/18130>\
**Category:** SHF Discussion and Questions\
**Tags:** workflows, identity-security-cloud\
**Created:** [September 25, 2023, 5:46pm UTC](https://developer.sailpoint.com/discuss/t/workflow-loop-inside-loop/18130 "2023-09-25T17:46:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsosa](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/jsosa/32/31578_2.png) [@jsosa](https://developer.sailpoint.com/discuss/u/jsosa)\
**Post date:** [September 25, 2023, 5:46pm UTC](https://developer.sailpoint.com/discuss/t/workflow-loop-inside-loop/18130/1 "2023-09-25T17:46:00Z")

</div>

Hi! I am working in a worklow that get all identities action (with some filtering query). Then, I attach its output tu a loop. Then, for each identity in the loop, I would need to use get accounts action, and then the manage accounts in order to disable them. But I am not being able to use loop inside another loop. I tried altering at worflow json level, but only broke workflow 🙂 is some solution to this, or perhaps I have to put the account thing in another workflow, and call it from the first one? Thanks!

---

<div class="post-metadata">

**Author:** ![Bakhari](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/bakhari/32/29973_2.png) [@Bakhari](https://developer.sailpoint.com/discuss/u/Bakhari)\
**Post date:** [September 25, 2023, 9:46pm UTC](https://developer.sailpoint.com/discuss/t/workflow-loop-inside-loop/18130/2 "2023-09-25T21:46:26Z")

</div>

Can you post some screenshots of your workflow?

---

<div class="post-metadata">

**Author:** ![iamnithesh](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/iamnithesh/32/42445_2.png) [@iamnithesh](https://developer.sailpoint.com/discuss/u/iamnithesh)\
**Post date:** [September 26, 2023, 12:55am UTC](https://developer.sailpoint.com/discuss/t/workflow-loop-inside-loop/18130/3 "2023-09-26T00:55:58Z")

</div>

Have you tried using identities[\*].accounts as input to the loop?

---

<div class="post-metadata">

**Author:** ![jsosa](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/jsosa/32/31578_2.png) [@jsosa](https://developer.sailpoint.com/discuss/u/jsosa)\
**Post date:** [September 27, 2023, 6:10pm UTC](https://developer.sailpoint.com/discuss/t/workflow-loop-inside-loop/18130/4 "2023-09-27T18:10:59Z")

</div>

Hi people, thanks very much for response. We are at a go live this week and have to left this demand slept until next week. I will return then. @iamnithesh yes I tried with identities[\*].accounts but after run accounts remained enabled.

---

<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:** [November 26, 2023, 6:11pm UTC](https://developer.sailpoint.com/discuss/t/workflow-loop-inside-loop/18130/5 "2023-11-26T18:11:27Z")

</div>

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