<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Lookup action to keep trying until user is found in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/lookup-action-to-keep-trying-until-user-is-found/m-p/3394758#M1231110</link>
    <description>&lt;P&gt;Hello friends,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this simple Flow to add user to Entra ID group. This runs after the new user account is created in AD (separate flow), we added to the new user creation a 22 minute timer to allow replication between multiple systems, DCs, cloud, etc.&lt;BR /&gt;&lt;BR /&gt;However, sometimes, the account is not synced in time to Entra ID by the time this flow runs. The error message received is "Error: No user found."&lt;BR /&gt;&lt;BR /&gt;We don't want that to be completed and skipped as error, because most of the time this action runs fine, but sometimes, the user doesn't get synced in one, two or even 5 minutes, so instead of adding additional timer, we would like to have the Flow try again in 1min until the user is found.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;But my question is, how should I make the Flow to go back to that action once the IF condition is matched?&lt;BR /&gt;Or should we add another Lookup action?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-09-30 at 14.29.16.png" style="width: 999px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/473685i69C525ACF6F22B51/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-09-30 at 14.29.16.png" alt="Screenshot 2025-09-30 at 14.29.16.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;</description>
    <pubDate>Tue, 30 Sep 2025 18:50:53 GMT</pubDate>
    <dc:creator>Luiz Lucena</dc:creator>
    <dc:date>2025-09-30T18:50:53Z</dc:date>
    <item>
      <title>Lookup action to keep trying until user is found</title>
      <link>https://www.servicenow.com/community/developer-forum/lookup-action-to-keep-trying-until-user-is-found/m-p/3394758#M1231110</link>
      <description>&lt;P&gt;Hello friends,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this simple Flow to add user to Entra ID group. This runs after the new user account is created in AD (separate flow), we added to the new user creation a 22 minute timer to allow replication between multiple systems, DCs, cloud, etc.&lt;BR /&gt;&lt;BR /&gt;However, sometimes, the account is not synced in time to Entra ID by the time this flow runs. The error message received is "Error: No user found."&lt;BR /&gt;&lt;BR /&gt;We don't want that to be completed and skipped as error, because most of the time this action runs fine, but sometimes, the user doesn't get synced in one, two or even 5 minutes, so instead of adding additional timer, we would like to have the Flow try again in 1min until the user is found.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;But my question is, how should I make the Flow to go back to that action once the IF condition is matched?&lt;BR /&gt;Or should we add another Lookup action?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-09-30 at 14.29.16.png" style="width: 999px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/473685i69C525ACF6F22B51/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-09-30 at 14.29.16.png" alt="Screenshot 2025-09-30 at 14.29.16.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2025 18:50:53 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/lookup-action-to-keep-trying-until-user-is-found/m-p/3394758#M1231110</guid>
      <dc:creator>Luiz Lucena</dc:creator>
      <dc:date>2025-09-30T18:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup action to keep trying until user is found</title>
      <link>https://www.servicenow.com/community/developer-forum/lookup-action-to-keep-trying-until-user-is-found/m-p/3394759#M1231111</link>
      <description>&lt;P&gt;You can create a Flow Variable, then add an Else to the If block to update the Flow Variable (if the user is found).&amp;nbsp; Put the look up and If inside a 'Do the following until' activity (while the Flow Variable is empty).&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BradBowman_0-1759259068084.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/473686iFFA1B095FAA0AA24/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="BradBowman_0-1759259068084.png" alt="BradBowman_0-1759259068084.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2025 19:05:08 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/lookup-action-to-keep-trying-until-user-is-found/m-p/3394759#M1231111</guid>
      <dc:creator>Brad Bowman</dc:creator>
      <dc:date>2025-09-30T19:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup action to keep trying until user is found</title>
      <link>https://www.servicenow.com/community/developer-forum/lookup-action-to-keep-trying-until-user-is-found/m-p/3394773#M1231115</link>
      <description>&lt;P&gt;Thanks,&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/174062"&gt;@Brad Bowman &lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Was just trying that, but then another question came up, in case of a user doesn't exist, we would like that "&lt;EM&gt;do this until user is found&lt;/EM&gt;" to stop after, let's say 10 attempts, is that possible?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2025 19:16:05 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/lookup-action-to-keep-trying-until-user-is-found/m-p/3394773#M1231115</guid>
      <dc:creator>Luiz Lucena</dc:creator>
      <dc:date>2025-09-30T19:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup action to keep trying until user is found</title>
      <link>https://www.servicenow.com/community/developer-forum/lookup-action-to-keep-trying-until-user-is-found/m-p/3394780#M1231116</link>
      <description>&lt;P&gt;You could create another integer Flow Variable, then add an OR condition to your until...&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BradBowman_0-1759260224000.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/473691iC0E9E30A5B751E6C/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="BradBowman_0-1759260224000.png" alt="BradBowman_0-1759260224000.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Before or after waiting for 1 minute in the 'then' block, add a Set Flow Variables activity to increment the 'attempts' - a scripted condition something like this will work&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;return fd_data.flow_var.attempts++;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2025 19:27:11 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/lookup-action-to-keep-trying-until-user-is-found/m-p/3394780#M1231116</guid>
      <dc:creator>Brad Bowman</dc:creator>
      <dc:date>2025-09-30T19:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup action to keep trying until user is found</title>
      <link>https://www.servicenow.com/community/developer-forum/lookup-action-to-keep-trying-until-user-is-found/m-p/3394789#M1231117</link>
      <description>&lt;P&gt;Thanks for the help, Brad!&lt;BR /&gt;That should work.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LuizLucena_0-1759261418885.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/473695iA9834F11640F5B88/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LuizLucena_0-1759261418885.png" alt="LuizLucena_0-1759261418885.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2025 19:43:46 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/lookup-action-to-keep-trying-until-user-is-found/m-p/3394789#M1231117</guid>
      <dc:creator>Luiz Lucena</dc:creator>
      <dc:date>2025-09-30T19:43:46Z</dc:date>
    </item>
  </channel>
</rss>

