Views:

Applies to Product - Power Automate


What’s happening?
Customer is experiencing difficulties in restoring deleted flows in Power Automate.
 

Reason:

  • Flows may be deleted accidentally by a user. 

 

Resolution:
To restore a deleted flow in Power Automate using PowerShell, please follow the below steps:
1. Open PowerShell with elevated permissions.
2. Install the latest version of PowerShell cmdlets for Power Apps: Install-Module -Name Microsoft.PowerApps.Administration.PowerShell -AllowClobber
3. Sign in to your Power Apps environment: Add-PowerAppsAccount
4. Get a list of flows in the environment, including soft-deleted flows:  Get-AdminFlow -EnvironmentName <YourEnvironmentName> -IncludeDeleted $true
5. Find the FlowName of the deleted flow:  Get-AdminFlow -EnvironmentName <YourEnvironmentName> -IncludeDeleted $true | Where-Object {$_.DisplayName -eq "gift card replacement to excel"}
6. Restore the deleted flow: Restore-AdminFlow -EnvironmentName <YourEnvironmentName> -FlowName <FlowName>  [ Ensure you replace <YourEnvironmentName> and <FlowName> with the actual environment name and flow name obtained from the previous steps]
For more details, please refer to the documentation on restoring deleted flows with PowerShell: https://learn.microsoft.com/en-us/power-automate/how-tos-restore-deleted-flow#restore-deleted-flows-with-powershell
Note:
-A flow can be restored within 21 days of deletion. Flows that were deleted more than 21 days ago can't be recovered. Both restore methods (PowerShell script and Power Automate Management connector), as well as Microsoft Support can't help to restore them.