Power Automate Agent for Virtual Desktop Is Disconnected

Power Automate Agent for Virtual Desktop Is Disconnected: Causes and Fixes

When you see the message “Power Automate agent for virtual desktop is disconnected”, it means the Power Automate Desktop (PAD) agent or the Remote Desktop connection that manages automation between your local machine and the virtual environment has lost communication. This typically happens when the Remote Desktop session is closed, the PAD agent service stops unexpectedly, or network or policy restrictions interrupt the connection. In simple terms, your automation process cannot continue because the virtual desktop hosting the agent is no longer reachable by Power Automate.

In this detailed guide, we’ll explore why this disconnection happens, how Power Automate for Virtual Desktop works, and step-by-step solutions to permanently fix this issue.

Understanding Power Automate for Virtual Desktop

Power Automate for Desktop (PAD) is Microsoft’s automation platform that allows users to create RPA (Robotic Process Automation) flows — automating repetitive desktop tasks such as data entry, report generation, or system configuration.

When running PAD on a Virtual Desktop Infrastructure (VDI) such as Azure Virtual Desktop or Windows 365 Cloud PC, a Power Automate agent manages the connection between your local Power Automate environment (the cloud) and the virtual machine.

Here’s what happens in a typical setup:

  1. You create a desktop flow in Power Automate.
  2. The flow is triggered from the cloud or local environment.
  3. The Power Automate agent installed on the virtual desktop executes the automation steps.

If the agent disconnects or stops responding, your flow fails — resulting in the “agent disconnected” error message.

Common Causes of “Power Automate Agent for Virtual Desktop Is Disconnected”

This issue can be triggered by various system and configuration problems. Let’s look at the most common ones:

    1. Remote Desktop Session Closed or Timed Out
      • When the RDP session used to run the Power Automate Desktop agent closes, the automation stops.
      • Many organizations use session timeouts for security, which can trigger disconnection.
    2. Agent Service Stopped
      • The Power Automate agent runs as a Windows service. If this service stops or crashes, the agent disconnects automatically.
    3. Network or Firewall Issues
      • The agent requires a stable network connection to communicate with the Power Automate cloud service. Network drops or blocked ports can break this connection.
    4. User Logoff or Sleep Mode
      • If the user logs off or the virtual desktop goes into sleep mode, Power Automate loses its runtime environment.
    5. Outdated Agent or PAD Version
      • Older versions of the Power Automate Desktop app or agent may have bugs that cause connection instability.
    6. Policy or Group Settings
      • In enterprise environments, certain Group Policy settings (like session limits or restricted background processes) can interfere with agent connectivity.

How Power Automate Agent Works with Virtual Desktops

To fix the issue properly, it’s important to understand how the Power Automate agent integrates with virtual desktop environments.

When you install PAD on a VDI or Windows 365 Cloud PC:

  • The agent service runs in the background, listening for flow triggers from the Power Automate cloud.
  • When a flow starts, the agent launches a virtual desktop session (if needed) and runs the automation.
  • It reports results and status updates back to Power Automate through secure HTTPS communication.

If the VDI host reboots, the session logs off, or the network connection drops, the communication channel between the agent and Power Automate breaks — causing the “disconnected” status.

Therefore, the main goal of troubleshooting is to maintain a persistent, stable connection between Power Automate and the virtual desktop.

Step-by-Step Solutions to Fix the Disconnection

1. Check Power Automate Agent Service Status

Ensure that the agent service is running on your virtual desktop.

  • Press Windows + R, type services.msc, & hit Enter.
  • Locate Power Automate Service or UI Flow Service.
  • Right-click → Start or Restart if it’s stopped.
  • Set Startup type to Automatic to ensure it starts after reboot.

You can also use PowerShell to verify:

Get-Service -Name "Power Automate Service"

If it shows Stopped, restart it using:

Start-Service -Name "Power Automate Service"

2. Keep RDP Session Active

If you’re running PAD inside a Remote Desktop session, make sure the session stays active.

  • Open Group Policy Editor (gpedit.msc).
  • Navigate to:
    Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Session Time Limits
  • Set the time limit for active but idle Remote Desktop Services sessions to Disabled.

This prevents automatic logoff or disconnection during automation runs.

3. Update Power Automate Desktop and Agent

Microsoft frequently releases updates to fix bugs and enhance stability.

  • Open Power Automate Desktop → Settings → Check for updates.
  • Alternatively, download the latest version from the Microsoft Power Automate website

Keeping both PAD and the Power Automate agent up-to-date ensures better compatibility with Windows updates and the Power Automate cloud.

4. Check Network and Firewall Settings

Ensure that your virtual desktop can communicate with Power Automate services.

  • Whitelist these domains:
    *.microsoft.com
    *.flow.microsoft.com
    *.powerautomate.com
  • Allow port 443 (HTTPS) through your firewall.
  • Avoid VPNs or proxy servers that may block outbound traffic to Microsoft services.

You can test connectivity by running:

ping flow.microsoft.com

If you don’t get a response, network restrictions might be the problem.

5. Configure Power Settings on the Virtual Desktop

Prevent your VDI or Cloud PC from sleeping during automation runs:

  • Go to Settings → System → Powers & Battery.
  • Set Sleep to Never while plugged in.
  • Disable hibernation by running this command:
powercfg /hibernate off

This ensures the desktop remains awake for long-running flows.

6. Use an Unattended RPA Setup

If you’re using attended (manual) sessions, switch to unattended automation, which is more stable for virtual desktops.

Unattended RPA allows PAD to:

  • Run in the background without user intervention.
  • Reconnect automatically if the session disconnects.
  • Resume after reboots.

To enable unattended mode:

  • In Power Automate Portal, go to Machine Groups.
  • Add your virtual desktop as a machine.
  • Assign it as an unattended machine.
  • Configure credentials securely.

Now, your automation will continue to run even if the RDP session closes.

7. Check for Conflicts with Security Policies

Some enterprise environments apply strict policies that can stop background agents.

Ask your IT admin to verify:

  • No restrictions are applied on UIFlowService.
  • Background processes are allowed for Power Automate.
  • Interactive logon is permitted for the automation user account.

Preventing Future Disconnections

To ensure you don’t face this issue again:

  • Keep Windows, PAD, and the Power Automate agent updated.
  • Use unattended mode for long-running or scheduled flows.
  • Maintain stable network connectivity.
  • Configure your VDI host for always-on sessions.
  • Regularly restart the agent service as part of maintenance.

For enterprise automation, consider monitoring agent health via Power Automate Analytics, which provides real-time status and error logs for connected machines.

Final Thoughts

The “Power Automate agent for virtual desktop is disconnected” error usually occurs when the communication link between Power Automate and the virtual machine is broken — often due to session timeouts, service stoppages, or network issues. The good news is that this problem is entirely fixable with the right configuration.

By keeping your RDP sessions active, ensuring the agent service runs continuously, and using unattended automation mode, you can achieve a fully reliable Power Automate setup on Windows Virtual Desktop or Azure Virtual Desktop.

With these fixes, your automations will run smoothly and continuously — transforming your virtual environment into a powerful, hands-free digital workspace.

Scroll to Top