When the flow owner leaves the company, the flow will be disabled.

For viral flows, you should use Service Account to create a flow, see more here: Connect with Service Principal to use Common Data Service (CDS) in Microsoft Power Automate


In this article, I will write about how to change the flow owner when they leave the company.


METHOD 1: USING POWER AUTOMATE FLOW


Create a Manually flow, put the required fields put roleName, put id



You can also use this action:


METHOD 2: USING POWERAPP- POWERSHELL

I- Install PowerApps PowerShell


  1. Execute the following commands firstly:

    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force
    dir . | Unblock-File

  2. Import necessary modules:

    Install-Module -Name Microsoft.PowerApps.Administration.PowerShell

          Install-Module -Name Microsoft.PowerApps.PowerShell -AllowClobber


            If you got other errors, also should try:

            [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

            Install-Module PowerShellGet -RequiredVersion 2.2.4 -SkipPublisherCheck


            From https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/


            [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls -bor             [Net.SecurityProtocolType]::Tls11 -bor [Net.SecurityProtocolType]::Tls12


II- Change Flow Owner

Copy and paste the following:

Set-FlowOwnerRole


Then you just need to provide the required details like: flow id, user id..


How to manage orphan flows when the owner leaves the organization (microsoft.com)


Hope this helps!


David Nguyen