07-23-2019 10:42 AM
@viewfile sorry for the late response. Currently the "official" Microsoft way of cancelling an approval is via the UI. There is no simple "Cancel approval" action. Maybe it will be there in the future, but for now the CDS way is the only automated way to do this. Be aware: it requires premium licensing to work with CDS.
Maybe @dblyth knows more about the plans for providing a cancel approval action.
Thanks @pcmccull - I should have thought of that myself!
Is using this "Cancel an approval using a record action from the CDS Connector" method the official Microsoft way of cancelling an approval in the Flow? The previous posts from them said approvals are now "cancellable" and they were going to document it, but I've seen nothing. This method seems to work, but I don't want to spend loads of time implementing it in lots of Flows, if a simple "Cancel Approval" action then suddenly appears from Microsoft.
Thanks for the great workaround though
Thank you for posting this, it's exactly what I was trying to do. However, I'm getting a Forbidden error anytime I try to update the Approval. Does this require some sort of permission change? I'm currently getting the Approval ID and saving it in a SharePoint list. Later when the Approval is reassigned to someone else, I'm trying to cancel the approval using that id. I also tried just doing it inline, so create an approval and cancel it immediately. The error message is "Principal user is missing prvWritemsdyn_flow_approval privilege".
@viewfile If you switch to using "Create an Approval" instead of "Start and wait for an approval" then you could branch off of that with the left branch having a "Wait for an approval" and on the right branch you would have access to the Approval ID in your loop.
Thanks for posting this video. However, you are manually getting the approval record identifier from the first flow and manually putting this into the second flow before running it. Is there a way to do this within the Flow?
For example, here is a simple test approval flow. If the approver hasn't responded to the approval task after 30 minutes it'll send them an email reminder. It'll wait 30mins and if they still haven't actioned the approval it'll send them another reminder. It will send 3 reminder emails and if it's still not actioned then we want to cancel the approval task.
How do we get the approval record identifier of the approval task so we can put that into a CDS connector as in your method in this place in the flow?
Hope this makes sense and thanks in advance for any help.
During this video, I will show you how you can cancel approvals. I will show you how this works through the UI and how to cancel through the "Update a record" action from the CDS Connector.