Applies to Product - Power Platform Administration
What’s happening?
Customers are experiencing issues with restoring flows using PowerShell, particularly when the flows may have been soft-deleted more than 21 days ago.
Reason:
The flows were likely deleted more than 21 days prior, which prevents recovery through standard methods. Additionally, if audit logging was not enabled in the environment, there is no record of when or by whom the flows were deleted.
Resolution:
- To list all soft-deleted flows in the environment, use the following PowerShell command: Get-AdminFlow -EnvironmentName {ALPHANUMERIC} -IncludeDeleted $true | Where-Object {$_.Internal.properties.state -eq 'Deleted'}
- If the flows were part of a solution, check if a previous version of the solution can be restored.
- If audit logging was enabled, verify the logs to determine when the flows were deleted and by whom. This can be done by navigating to the Power Platform, selecting the environment, and checking the Audit Settings.
- If the flows were deleted more than 21 days ago, recovery is not possible as per Microsoft’s policy. Please refer to the documentation for more information: https://learn.microsoft.com/en-us/power-automate/how-tos-restore-deleted-flow#restore-deleted-flows-with-the-power-automate-management-connector
