I want to know how to cancel the approval request after a day,
for send the approval request to other person.
1 step, Send the approval request to a manager, and wait a day.
2 step, Send the approval request to other manager when no-response by first manager,
and cancel the approval request of 1 step.
Sorry, I was not suggesting you put the entire approval flow inside a Do-Until, only the response condition @body('Start_an_approval')?['response']. Then set your timeout to 1 day.
Hi @yoshihirok ,
It is not possible to cancel a pending approval from flow.
There is a similar request on Flow Ideas Forum, please vote the idea at here:
By the way, please try if the following workaround will work for you.
Set the Timeout duration of the approval action as PT1D under Settings of the first approval action. Then configure Run after as “has timed out” for another approval action to send the request to another person.
I'm currently doing exactly that with a timeout. I'm frustrated that when an approval action times out, it doesn't dissappear from the approvals part of flow. This makes zero sense. I have to go in and approve or deny all of them for them to go away.
I either need automatic reminders for approvals, or for this feature to be corrected. If an approval times out, it should disappear from the flow approvals for the user.
There is a way to cancel an approval request but it requires that the flow maker to have certain environment permissions. Approval requests are stored in the common data service in the Approvals entity. If you have write access to the entity then you can change the status of the Approval to inactive after it timesout. This will remove the request from thier queue.
Could you please write how to access CDS and cancel approval ? this would be very helpful. Or post some article/howto where this approach is documented.
thank a lot
You access the CDS by using the Common Data Service List records connector. You enter the environment name and the Approval entity into the connector. This will give you all the approval records that are in the environment. Next you filter the returned array for the specific approval you are looking for. Then by using the CDS update record connector, use the iteminternalid as the record identifier and update the Status Reason Value to expired.
Please note, you must have sufficient privileges to update the CDS record.
We are using the timeout option. But Power Automate behaves very unexpectedly. If a reminder is sent to the same person that caused the timeout, the person can't respond to the initial approval anymore (PA will state something like, "approval request has expired"), only to the "reminder" approval. This is perfectly fine for me. BUT, if the flow sends a new approval request to a DIFFERENT person, the first person can still respond to the request, but this respond is not taken into account by the flow, in our case, our SharePoint library is not updated, but the person will not know without checking the library. This is totally confusing!
A timed out approval request should always show an error message if person tries to respond to it after a timeout has occured.
I don't know how to implement this in my flow. We have set up three flows actually: a launcher that includes a trigger (When a new file is created in the library). This takes care of all one time activities. This flow ultimately calls another flow (controller flow) which contains all the logic for the different approval stages etc. But it doesn't send out the actual approval request, instead it calls a third flow (approval flow) that sends out the request and calls the controller flow at the end, providing the output of the request (approve, rejected, time out).
This is based on the following idea: https://sergeluca.wordpress.com/2018/11/26/new-flow-state-machine-pattern-with-unlimited-running-tim...
So we escalate to the next person in hierarchy. Including the previous person as well would change the logic of the flow quite a bit. To me, this is Microsoft bug and they should rectify it.
@J_K_I understand. Sending approval to next person is an escalation, not just looking for another eligible approver. This can be done by using setting "First Approver" instead of "All Approvers". (or something similar).
BTW the article you have provided - very interesting - seems to me quite complicated. I like the idea to split logic, processing to many flows, but I think this can be done a more simple way. Based on set of flows and control of process status based on information stored in SharePoint list.
Also I would like to mention that file creation/modification trigger is very error prone, so actually I have stopped using it.
I barely use the modification trigger, either. But so far I haven't encountered any issues with the creation only triggers.
Maybe you could do it with two flows if the second flow calls itself in the end. Otherwise multiple stages, logic to go back and forth depending on the response etc. also make a single flow quite complex very quickly. But as always there are probably numerous ways of achieving a task.
Thank you for your suggestions.
Based on my current experience - it is possible to set timeout for approval.
One need to use approval creation and wait for approval actions.
When approval creation action has set time out (Settings) to PT24H it expires after 24 hours. Then one can define parallel flow in case this action is time outed and you can send approval request to another person.
Unfortunately, approval request stays in approval list for the first person. but - if this person makes an action - it does not matter. Whatever he or she does will not have any further result. The parent flow simply runs further and result of approval is not passed to the flow anymore. one can address this showing an information for approver how much time they have to take action and that after the deadline any action is in fact obsolete.
Read the announcement for more information!
Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!
The top training and networking event across the globe for Microsoft Business Applications