Run unattended desktop flows

Triggering desktop flow from cloud flows enables you to run desktop flows in unattended mode. Unattended desktop flows are ideal for automating tasks that don't need human supervision.

Power Automate uses the selected desktop flow connection to automatically sign in to your machine and run the unattended desktop flow. When the flow is complete, it signs out from the device and reports its activity.

When running desktop flows in unattended mode, keep in mind that:

  • Power Automate creates, manages, and then releases the Windows user session on the target devices.

  • Unattended desktop flows keep the screen of the target machine locked so no one can see them running.

  • Windows 10 and Windows 11 devices can't run unattended desktop flows if any active Windows user sessions are present (even a locked one).

  • On Windows Server, if you have a locked Windows user session open with the same user as the desktop flow connection, you'll receive an error.

Important

  • Unattended desktop flows require an available machine with all users signed out.
  • Locked Windows user sessions will prevent unattended desktop flows from running.
  • Unattended desktop flows can't run with elevated privileges.

Reuse a Windows session in unattended mode

Desktop flows can run on a Windows session as long as it exists and is unlocked for unattended runs.

Power Automate creates a new session for each unattended run on the machine using the credentials provided in the connection. The flow runs on this session, and then Power Automate signs it off.

The reuse Windows session functionality allows desktop flows to run on an existing session. After a desktop flow run, the session gets locked, and Power Automate can reuse it for another run.

To allow reusing Windows session:

  1. Sign in to Power Automate

  2. Select Monitor, and then Machines.

  3. Select the target machine or machine group

  4. Select Settings in the Command bar

  5. Enable Reuse sessions for unattended runs

Note

When you add machines to machine groups, they inherit the settings of the group. When you remove machines from machine groups, they keep the settings defined at the group level.

Known issues and limitations

  • Reusing sessions isn't supported on machines that allow users to have multiple sessions (users aren't restricted to a single session).