cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Craig77
Level: Powered On

delete all approvals

Guys, is there a way to completely remove or delete all approvals in my list.  I accidentally set a recurrence to 1 minute yesterday and today i am showing 100's of approvals.

 

flow.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: delete all approvals

@Craig7:

 

As @v-yuazh-msft has mentioned, you'll need to address these one at a time.  However, they'll go away on their own in 30 days if no action is taken.

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: delete all approvals

Hi @Craig77,

 

I afraid tha you could only deleting all approvals by approve the request one by one from the approval list in microsoft flow currenctly.

I afraid that there is no any way to remove or delete all approvals in your approval list without approve the request one by one.

 

If you want the function to remove or delete all approvals in the approval list to be supported in Microsoft Flow currently, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

Best regards,

Alice

Super User
Super User

Re: delete all approvals

@Craig7:

 

As @v-yuazh-msft has mentioned, you'll need to address these one at a time.  However, they'll go away on their own in 30 days if no action is taken.

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

Highlighted
levijohnson
Level: Powered On

Re: delete all approvals

If the flows are cancelled that generated these approvals, THESE APPROVALS SHOULD AUTOMATICALLY BE REMOVED!!! This is a terrible oversight on the Flow Teams' part. This is very annoying. They should also go away if they time out on the action (i have a 15 minute timeout on mine). 

 

ZachS15
Level: Powered On

Re: delete all approvals

If you're a developer just looking to clear an account's approvals (approve or reject, not delete), then this script will work. I created a loop that just uses jQuery to approve each card by simulating button clicks and pauses. I had over 400+ approvals to clear and it only took a few minutes. You have to be on the Flow approvals page that displays the cards to run it.

 

If you need to reject cards you can change 

button:first-child

to 

button:last-child

Here's the code:

//Get all approval cards on the page
var appCards = jQuery('.approval-card .actions > button:first-child');
var i = 0;

(function approveCard() {
    //Pause for each approval
    setTimeout(function () {
        //Approve the card
        appCards.eq(i).click();

        //Wait for panel to open
        setTimeout(function () {
			//Confirm approval
            jQuery('.confirmSection .fl-NgReactDefaultButton > button').click();
        }, 2000);

        //Go to next approval card
        i++;

        //If there are more cards, approve the next one
		if(i < appCards.length)
            approveCard();

    }, 2000)
})();

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Users online (4,922)