I have a flow which almost always successfully works. The point of failure occurs during a REST API call using the 'Send an HTTP request to SharePoint'. The frustrating piece of the failure is that is only fails some of the time (~10-15%). It usually work most of the time, but when the action fails Flow doesn't flag it as a failure, but passes it through as if it were successful.
The API call is assigning a specific user to a specific user permissions group (as shown in the screenshot):
I've also added a subsequent action below this API call to send me an email with the username that was supposedly added to the permissions group. While Flow sees the API as successful and also flags the entire flow as successful, (at intermittent times) the user is NOT assigned to the group AND I also receive the email with the appropriate user's username.
So, in recap, my Flow works successfully (85-90%), but when it fails there are NO failure flags. The failure happens when the username is not added to the permissions group, but Flow acts as if it did add it to the group and continues on its merry way to the end of the workflow.
What could cause this anomonly?
Hi @adove ,
I have made a test using a flow which is configured likes below, it is always working properly.
Please check it for a reference and try again with it on your side.
There is a slight difference between your body script and mine.
The prefix to your 'LoginName' is as follows:
While the previx to my 'LoginName is as follows:
Should I presume that the 'f' and the 'w' are simply variables and their actual difference is moot?
Plus, as I said in my inital explanation, it's not like my api doesn't work at all. The issue is that it works MOST of the time. Most of the time when I run the Flow, it works without a problem, but there are times when I run the same exact same tests and it fails for no apparent reason. The next hitch is that when it does fail (by not writing the username into the permissions group) Flow passes the action as 'acceptable', as if it actually worked, and moves on to the next action. The overview page detailing all the individual runs, which catalogs them as 'succeeded' or 'failed', logs the run as 'succeeded' even when the api doesn't actually write the username into the permissions group.
This inconsistency is boggling and I can't use this in production if I can't be sure the flow will actually work like its designed. I need to figure out the inconsistent behavior.
Hi @adove ,
I assume that the following blog could be your reference as well:
Could you take a try with "i:0#.f|xxxx"?
Please let me know if you are still getting the same issue.
Keep up to date with current events and community announcements in the Power Automate community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!