Hi!
I have an approval process to send request.
Is there an option to cancel a request so that the recipient cannot opportunity to approve or reject.
I have an Approval_ID for this request. Perhaps there is an option using the API?
You can use action Terminate!
I have a flow that with two branches, each with while loops with delay times.
One branch periodically checks if the approval was finished with variable ApprovalDone, which is set to true when a response is received. It is used to send reminder emails to approvals until done. The other also checks variable ApprovalDone, and checks the file property for the selected file. If file property content approval status changed from Pending to any other value, the approval status must be updated to cancel. A second variable, called Approval Cancelled is set to true, and the ApprovalDone variable is also set to true, thus exiting the while loop.
After the while loop, a condition is used to check if ApprovalCancelled = true. If so, I use a Terminate action from the Control runtime.
You can also add an update to the item content approval status, to either cancelled (if the column is custom) or draft (if using the default approval flow)
Unfortunately, the dataverse example provided only works if you have premium. 😞
Note that Terminate cannot be used within a loop.
Also be sure to include a post-check on approval response to verify if the item content approval status changed, in case it changed during the do while loop delay, before the approval response was received. This way you ensure that the item approval status isn't updated to approved/denied despite the request being cancelled.
Were you ever able to come up with a solution to get the wait for approval to cancel?
@rzaneti Your test is very good. Thank you!
I also tried to repeat it and managed to cancel the request. Both in the Dataverse table and in Teams the request was updated to Canceled.
The only problem is that the flow that run Approval process is still running and has not completed.
I will look for a solution to this problem.
Hi @xvzms ,
I ran some tests here and finally found a solution. You are in the right path.
I've just created an approval, which by default will receive the 'Requested' status:
By doing this, a new record was generated in 'Approvals' Dataverse table, with no result, Status Reason as pending and Status as Active:
Then in Power Automate, I update the following fields with the 'Update row' action:
After running the flow, the Dataverse record is updated, as expected:
And the approval receives the 'Canceled' status in Teams:
I don't know if this is a problem for you, but the only issue that I got is this weird 'Cancel date':
Let me know if it works for you or if you need any additional help!
-------------------------------------------------------------------------
If this is the answer for your question, please mark the post as Solved.
If this answer helps you in any way, please give it a like.
@rzaneti , Thank you very much!
I just check it and this work fine.
But I still want to try not to delete, but to change the status of the item. So that the flow stops working.
I tried adding the Update a row action, and changing the Result field to Canceled.
However this didn't work for me. The request is still in the Requested status.
Hi @xvzms ,
You can use the 'Approvals' Dataverse table. By just deleting the record, the approval will disappear. and the recipient won't be able to even see it.
You just need to be careful to isolate the correct approval to be deleted. In the flow below, for example, I'm filtering the approvals by recipient, title and status, and then deleting all records that match to these filters:
For your use case, as you have the approval ID inside your flow, you may be able to directly filter it without complexity.
The only problem of this approach is that your flow will still be running, even that the approval no longer exists. Apparently, there are some solutions for that here in the community (it wasn't a requirement for my case, so I didn't include it in my flow 🙂 ).
Let me know if it works for you or if you need any additional help!
-------------------------------------------------------------------------
If this is the answer for your question, please mark the post as Solved.
If this answer helps you in any way, please give it a like.
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492