- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hello friends,
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.
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."
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.
But my question is, how should I make the Flow to go back to that action once the IF condition is matched?
Or should we add another Lookup action?
Thanks in advance,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago - last edited an hour ago
You can create a Flow Variable, then add an Else to the If block to update the Flow Variable (if the user is found). Put the look up and If inside a 'Do the following until' activity (while the Flow Variable is empty).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago - last edited an hour ago
You can create a Flow Variable, then add an Else to the If block to update the Flow Variable (if the user is found). Put the look up and If inside a 'Do the following until' activity (while the Flow Variable is empty).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
57m ago
Thanks, @Brad Bowman
Was just trying that, but then another question came up, in case of a user doesn't exist, we would like that "do this until user is found" to stop after, let's say 10 attempts, is that possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
46m ago
You could create another integer Flow Variable, then add an OR condition to your until...
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
return fd_data.flow_var.attempts++;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
29m ago
Thanks for the help, Brad!
That should work.