I've seen a few other posts on this, but none seem to resolve my issue here. I'm looping through all users in an organization and calling their "manager" endpoint in Microsoft Graph. I understand that I'll get 404s when they don't have a manager, and so I set up what I expected to be the correct way to handle these.
I configured two "Run After" steps; one for "Has Failed" and one for "Successful". The "Has Failed" simply increments a counter; I don't need to necessarily do anything after the failure. The Success writes to an array, that will eventually get written to a file. I'm writing two files at the end, so I do have subsequent steps after the Apply To Each.
Do I have to have a step after the increment variable on the fail condition for it to continue?
For clarification, here are my "Run After" configurations:
Hi, were you able to resolve this issue? I am trying to do something similar. TRying to read a row from excel to see if it exists or not and do certain actions in both cases. But on "has failed" action works but the flow is marked failed. Is there a way to fix this?
I'm having the exact same problem except I tried to initialize and set a variable to check if it was null, but it still won't proceed once it gets that 404 manager not found error
Hi!
Apply to each will not proceed to the next action if the previous action failed.
If you want to keep going after a failure is encountered, you can simply insert the Apply to Each action within Do Until. Please refer below steps
Hope this helps! Please post your questions if any.
Well then it's even simpler. You just need two branches, One for when the previous action is Successful and the other when the previous action has Failed.
In this case, when there is a failure, the actions in the Failed Branch will execute but the Status of the Flow will show as Failed because there was indeed a failure.
To avoid confusion here, at the end of the Failed Branch, you can add a Terminate action and set the Status to either "Successful" or "Cancelled".
Not a problem! 🙂 Please mark the response as a solution if you found it helpful.
Is there a solution for this if the HTTP request is inside an apply to each control? Cant use the terminate action in this case.
My flow is almost exactly like this except that instead of the HTTP3 request, I have a get item SharePoint action. I understand that it will not work in some cases so I set up my flow to send a Teams message and then terminate the flow.
However, when the get item fails, the "post message in chat or channel" does not run and the terminate action is skipped even after I configured the run after to only when the SharePoint get item action fails.
I have attached a picture of the flow below.
User | Count |
---|---|
23 | |
15 | |
14 | |
10 | |
9 |
User | Count |
---|---|
48 | |
29 | |
28 | |
25 | |
23 |