How to restart UI flows to recover from a bad state

Applies to: Power Automate


If you are in a state where you are consistently experiencing an error when performing a UI flow run, recording or test, but nothing is actionable, it may help to restart UI flows by restarting the service.

You must be an admin on the machine to restart the service.


Before restarting the UI flow service, verify in the task manager that the UI flows agent (Microsoft.Flow.Rpa.Agent) is not running.  If it is running, click End task.

RPA Agent process in task manager screenshot

Use the following methods to restart the UI flow service in the following order.  Note that you must be an admin to restart the service.

  • Method 1 : Restart UIFlowService
    • Open the task manager and go to the services tab, then look for UIFlowService, right click on it, and click Restart
      UI flow service in task manager screenshot
  • Method 2: If method 1 returns an error, you can try to restart the service manually as follows:
    • Kill (end task) the UI flow service process (parent of the service) in the process tab of the task manager. 
      UI flow service associated process in task manager screenshot
  • Then delete session.json located in
    • C:\Windows\ServiceProfiles\UIFlowService for Windows 10
    • C:\Users\UIFlowService for Windows Server 2016 and Windows Server 2019
  • Note that the service should automatically restart after the task had ended.