Views:

Applies to Product - Power Automate


What’s happening?
Users are unable to delete Power Automate templates that were shared by an employee who has now left the organization. The delete option is not available, leading to confusion with newer templates.


Reason:
The inability to delete the templates is due to the fact that only the original creator of the templates has the permission to delete or unshare them. If the creator has left the organization, the templates remain in the system without an owner.


Resolution:

  1. Check User Existence: Execute a browser trace when viewing the "Shared with me" templates tab to get the submitterUserId value. Check if that user exists in the system.
  2. PowerShell Commands: If the user does not exist, use the following PowerShell commands to attempt to change the owner of the templates:
  3. Use Get-AdminFlow -EnvironmentName <Environment ID> -IncludeDeleted $true to retrieve the flows.
  4. If the flows are found, use Set-AdminFlowOwnerRole -EnvironmentName <Environment ID> -FlowName <Flow Name> -NewOwner <New Owner ID> to change the owner.
  5. Confirm Deletion: After changing the owner, locate the flows under "My flows" and remove any sharing features that were enabled. This should prevent the templates from appearing in the shared list.
  6. Soft Delete Information: Note that if a flow is deleted, it enters a soft delete state for about 20 days. After this period, it is hard deleted from the backend and cannot be recovered.
If the templates cannot be located or deleted, it may be due to the elapsed time since the user left the organization, which could have resulted in the flows being hard deleted.