Mistakenly deleted your Power Automate flow. You can now restore Power Automate flows deleted in last 28 days.

Ever had a scenario where you mistakenly deleted a Power Automate flow? Or may be you created a flow and when you go back later you don’t see it.

You think someone might have deleted the flow. Unfortunately there was no way to retrieve it back. Well, no longer.

With the Power Platform 2022 Release Wave 1, you can now restore your deleted workflows. Let’s see how you can do this.

For now the feature is limited to PowerShell and you must connect to your Power Platform environment using admin account. So let’s get started.

The first step is to open up your PowerShell command as Administrator (Run as Administrator) and then make sure the latest version of Microsoft.PowerApps.Administration.PowerShell is installed. You can verify this by running the below command in your PowerShell window.


Install-Module -Name Microsoft.PowerApps.Administration.PowerShell -RequiredVersion 2.0.147
Restore deleted Power Automate flows.

The next step is to connect to your Power Platform environment using admin account credentials. For that use the following command.

Add-PowerAppsAccount

You shall get a login prompt. Enter environment admin credentials and login.

Once logged in, you can now list the available flows in the environment including the one which has been deleted in the last 28 days only.

For that use the below command.

Get-AdminFlow -EnvironmentName Default-0650677a-acd9-4cf8-972b-4ad36aa14fd5 -IncludeDeleted $true

Here “Default-0650677a-acd9-4cf8-972b-4ad36aa14fd5” is the Environment ID. You can get it from the Power Platform Admin center.

And below is the result of the query.

Restore deleted Power Automate flows.

I have a flow named -“Flow to Delete”. I haven’t deleted it yet. To test this, I went ahead and deleted the flow. And when I run the flow, I get the below results.

Restore deleted Power Automate flows.

The only difference you see now is Enabled state is to set False (highlighted in yellow).

To restore the deleted flow, you need the ID of it. The ID is actually the FlowName property in the results (First property in the results).

And here goes the final command to restore the Deleted flow.

Restore-AdminFlow -EnvironmentName Default-0650677a-acd9-4cf8-972b-4ad36aa14fd5 -FlowName ceb34af2-f3e9-4140-9710-4fe8ebe9aa95

Notice the usage of the FlowName value copied from previous result.

Remember, that once restored, the flow will be turned off by default. You still need to go ahead and enable it.

Restore deleted Power Automate flows.

Pretty neat and really great to know that Microsoft is gradually adding these cool useful features in Power Platform.

Hope this helped! You will also like the below posts.

Debajit Dutta
Business Solutions MVP


Discover more from Debajit's Power Apps & Dynamics 365 Blog

Subscribe to get the latest posts sent to your email.

Discover more from Debajit's Power Apps & Dynamics 365 Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading