You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: support/power-platform/power-automate/desktop-flows/troubleshoot-direct-connectivity-issues.md
+70-66Lines changed: 70 additions & 66 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Direct connectivity issues in Power Automate for desktop
3
3
description: Provides more information about how to solve the direct connectivity issues in Power Automate for desktop.
4
4
ms.reviewer: guco, madiazor, johndund, qliu
5
-
ms.date: 01/22/2025
5
+
ms.date: 05/15/2025
6
6
ms.custom: sap:Desktop flows
7
7
---
8
8
# Direct connectivity issues in Power Automate for desktop
@@ -18,26 +18,25 @@ When attempting to run your desktop flows from a cloud flow or manage your deskt
18
18
19
19
#### Scenario 1
20
20
21
-
- Your previously registered machines appear offline when they're booted up and connected to the network.
22
-
- Runs fail with either of these error messages:
21
+
- Your previously registered machines appear offline when they're started up and connected to the network.
22
+
- Runs fail with one of the following error messages:
23
23
24
-
> ConnectionNotEstablished - None of the connected listeners accepted the connections within the allowed timeout. Check that your machine is online.
25
-
26
-
> NoListenerConnected - The endpoint was not found. There are no listeners connected for the endpoint. Check that your machine is online.
24
+
-> ConnectionNotEstablished - None of the connected listeners accepted the connections within the allowed timeout. Check that your machine is online.
25
+
-> NoListenerConnected - The endpoint was not found. There are no listeners connected for the endpoint. Check that your machine is online.
27
26
28
27
#### Scenario 2
29
28
30
29
- Desktop flows run on a registered machine as long as a user session is running (attended runs) or even for some minutes after the last user signs out (unattended runs).
31
-
- The connection to the machine is lost after some minutes (for example, 15 minutes).
30
+
- The connection to the machine is lost after some minutes (for example, 15 minutes.)
32
31
- The connection is re-established once a user signs back in to the machine.
33
32
34
33
#### Scenario 3
35
34
36
-
When you sign out of your Windows computer, the machine status in the Power Automate portal shows as disconnected.
35
+
When you sign out of your Windows computer, the machine status shows as disconnected in the Power Automate portal.
37
36
38
37
## Cause
39
38
40
-
Direct to machine connectivity uses [Azure WCF relays](/azure/azure-relay/relay-what-is-it#wcf-relay) to allow the Microsoft cloud to connect to on-premises machines and schedule desktop flow runs. The Power Automate Windows service that runs on-premises opens a relay listener that connects to the Azure cloud by opening web sockets.
39
+
Direct to machine connectivity uses [Azure Windows Communication Foundation (WCF) relays](/azure/azure-relay/relay-what-is-it#wcf-relay) to allow the Microsoft cloud to connect to on-premises machines and schedule desktop flow runs. The Power Automate Windows service that runs on-premises opens a relay listener that connects to the Azure cloud by opening web sockets.
41
40
42
41
The most common cause of relay connectivity issues is the machine losing connection to the network. This can be caused by your machine not being powered on or losing network when no user is signed in to the machine.
43
42
@@ -48,105 +47,110 @@ The Power Automate service runs under its own Windows account (NT Service\UIFlow
48
47
49
48
If the machine and Power Automate service have reliable access to the network, the next likeliest source of issues is the on-premises network blocking or interfering with Azure relay connections.
50
49
51
-
A common culprit in both scenarios is a network proxy or a firewall that restricts outbound traffic.
50
+
A common culprit in both scenarios is a network proxy or a firewall that restricts outbound traffic.
52
51
53
52
In particular, authenticated proxies that use the credentials of the connected Windows user, given that the Power Automate service runs under its own dedicated account.
54
53
55
-
You can refer to [Proxy setup](https://support.microsoft.com/topic/power-automate-for-desktop-proxy-setup-8a79d690-1c02-416f-8af1-f057df5fe9b7) if you determine that you need to override the default proxy settings used by the Power Automate service. You may also need to [change the on-premises service account](/power-automate/desktop-flows/troubleshoot#change-the-on-premises-service-account).
54
+
You can refer to [Proxy setup](/power-automate/desktop-flows/how-to/proxy-settings) if you determine that you need to override the default proxy settings used by the Power Automate service. You may also need to [change the on-premises service account](/power-automate/desktop-flows/troubleshoot#change-the-on-premises-service-account).
56
55
57
56
Azure Relay requires to have all the relay gateways used by the primary and secondary namespaces allowed by the proxy and firewall configurations.
58
57
59
58
## How to investigate
60
59
61
-
1. To help you investigate these issues, make sure to engage your network administrators who will have the knowledge required to understand what is happening.
60
+
1. Engage your network administrators.
61
+
62
+
Involve your network administrators to analyze network configurations and logs.
62
63
63
-
2. Understand the topology of the network: what network devices does the traffic hop through before being handed off to the public internet: NAT, firewalls, proxies and so on. Get logs from these devices during impacted runs, and logs from the outermost network device attesting that the traffic to _*.servicebus.windows.net_ is handed off to the public internet.
64
+
2. Understand network topology.
64
65
65
-
3. If your network traffic runs though a proxy, attempt to mitigate the issue by [changing the on-premises account](/power-automate/desktop-flows/troubleshoot#change-the-on-premises-service-account) with which the Power Automate service (UIFlowService) runs.
66
+
- Trace the path of traffic through network devices (for example, NAT, firewalls, proxies) to the public internet.
67
+
- Collect logs from devices during impacted runs and confirm traffic to _*.servicebus.windows.net_ successfully reaches the public internet.
66
68
67
-
4. Get WCF logs from the Power Automate service (UIFlowService). For more information, see the [Enable WCF tracing](#enable-wcf-tracing) section below.
69
+
3. If your network traffic runs though a proxy, consider [changing the on-premises account](/power-automate/desktop-flows/troubleshoot#change-the-on-premises-service-account) used by the Power Automate service (UIFlowService).
68
70
69
-
5. Make sure your network configuration allows web socket traffic and long-running connections: a common pattern is proxies or other network devices killing connections after a set time.
70
-
6. Make sure firewall allows connections to Azure Relay gateways by following below steps:
71
+
4. Get WCF logs from the Power Automate service (UIFlowService). For more information, see [Enable WCF tracing](#enable-wcf-tracing).
71
72
72
-
#### Step 1: identify the Azure relay namespaces
73
+
5. Make sure your network configuration allows web socket traffic and long-running connections. Connections terminated after a set time may cause issues.
73
74
74
-
Two Azure relay namespaces can be used for the connecting a machine to the Power Automate cloud services.
75
+
6. Make sure firewall allows connections to Azure Relay gateways:
75
76
76
-
To identify the namespaces used by a machine:
77
+
**Step 1: identify the Azure relay namespaces**
77
78
78
-
1. Launch the "Power Automate machine runtime" application and sign-in
79
-
2. Locate the "Diagnose connectivity issues for runtime" section and click on "Launch diagnostic tool"
80
-
3. Wait for the diagnostics to end
81
-
4. Click on "Generate the report"
82
-
5. Open the generated xls file
83
-
6. Local the Data column and copy the 2 URLs corresponding to PrimaryRelay and SecondaryRelay
84
-
7. Extract the namespace part from each PrimaryRelay and SecondaryRelay URL https://\<namespace>/guid_guid
79
+
Two Azure relay namespaces can be used for connecting a machine to the Power Automate cloud services. To identify the namespaces used by a machine:
85
80
86
-
#### Step 2: Configure the firewall with the DNS names required for both the primary and secondary relays
81
+
1. Launch the Power Automate machine runtime application and sign in.
82
+
2. Locate the **Diagnose connectivity issues for cloud runtime** section and select **Launch diagnostic tool**.
83
+
3. Wait for the diagnostics to complete.
84
+
4. Select **Generate the report**.
85
+
5. Open the generated XLS file and locate the **Data** column.
86
+
6. Extract the namespace part from the URLs of **PrimaryRelay** and **SecondaryRelay** (for example, https://\<namespace>/guid_guid.)
87
87
88
-
Configure your firewalls with the DNS names of all the Relay gateways, which can be found by running [this script](https://github.com/Azure/azure-relay-dotnet/blob/dev/tools/GetNamespaceInfo.ps1) .
88
+
**Step 2: Configure the firewall with the DNS names required for both the primary and secondary relays**
89
89
90
-
This script will resolve the fully qualified domain names of all the gateways to which you need to establish a connection.
90
+
1. Configure your firewalls with the Domain Name System (DNS) names of all the Relay gateways.
91
91
92
-
Change any rules that previously used the IP addresses to use the namespace DNS names for port 443.
92
+
The DNS names can be found by running the [script](https://github.com/Azure/azure-relay-dotnet/blob/dev/tools/GetNamespaceInfo.ps1). This script will resolve the fully qualified domain names (FQDNs) of all the gateways to which you need to establish a connection.
93
93
94
-
#### Step 3: manual connectivity test can be done
94
+
2. Configure firewall rules to allow the DNS names on port 443 instead of IP addresses.
95
95
96
-
WCF tracing can be enabled on the machine in case of cloud connectivity issue. Direct connectivity issues in Power Automate for desktop - Power Automate | Microsoft Learn
96
+
**Step 3: Perform manual connectivity tests**
97
97
98
-
The log should contain exceptions related to connectivity for a specific DNS or IP address or point to missing proxy configuration.
98
+
WCF tracing can be enabled on the machine if there's cloud connectivity issue. For more information, see [Enable WCF tracing](#enable-wcf-tracing).
99
99
100
-
The connection between the machine and the endpoint can be tested by running a TCP ping:
100
+
The WCF log should contain exceptions related to connectivity for a specific DNS or IP address or point to missing proxy configuration.
101
101
102
-
1. Open PowerShell and run the below command
103
-
2. Test-netconnection \<ipaddress or dnsname> -port 443
102
+
To test the connection between the machine and the endpoint, run a TCP ping from PowerShell using the following command:
104
103
105
-
The result will be displayed as the output of TcpTestSucceeded.
104
+
```powershell
105
+
Test-netconnection \<ipaddress or dnsname> -port 443
106
+
```
106
107
107
-
If not succeeding, this is likely that the firewall does not allow the connection. Thus engage your network team to understand if any proxy or firewall could prevent access. There could be several firewalls and proxies between the machine and the Azure Relay services, thus make sure to check each of the subnet configurations.
108
+
If the `TcpTestSucceeded` shows `False`, it's likely that the firewall doesn't allow the connection. Engage your network team to understand if any proxy or firewall could prevent access. There could be several firewalls and proxies between the machine and the Azure Relay services, so make sure to check each subnet configuration.
108
109
109
110
## What information to include when opening a support ticket
110
111
111
-
- Your network topology: what are the devices that traffic goes through. (see the step 2 in the section above)
112
+
If the issue still persists, you can open a support ticket with Microsoft by providing the following details:
113
+
114
+
- Your network topology: what are the devices that traffic goes through. For more information, see the step 2 in the [How to investigate](#how-to-investigate).
112
115
- Whether the Power Automate service (UIFlowService) on your machine is running as the default account (NT Service\UIFlowService) or if it has been changed to run as a different account.
113
116
- Logs from your network devices showing that the traffic is indeed handed off to the public internet. Include times of the issues and the time zones used by the logs.
114
-
- WCF traces from the impacted machines. (see the [Enable WCF tracing](#enable-wcf-tracing) section below)
117
+
- WCF traces from the impacted machines. For more information, see [Enable WCF tracing](#enable-wcf-tracing).
115
118
- Desktop flow run IDs of impacted runs.
116
119
- Local logs from the impacted machine: they can be extracted using the Power Automate machine runtime app's troubleshooting pane.
117
120
118
121
## Enable WCF tracing
119
122
120
-
In the installation folder (typically _C:\Program Files (x86)\Power Automate Desktop_), edit the _UIFlowService.exe.config_ file. This requires running your text editor as administrator.
123
+
1. In the installation folder (typically _C:\Program Files (x86)\Power Automate Desktop_), edit the _UIFlowService.exe.config_ file. This requires running your text editor as administrator.
121
124
122
-
Add this config section:
125
+
2. Add the following configuration section between \</system.net> and \<appSettings>:
123
126
124
-
```xml
125
-
<system.diagnostics>
126
-
<sources>
127
-
<sourcename="System.ServiceModel"
128
-
switchValue="Information,ActivityTracing"
129
-
propagateActivity="true">
130
-
<listeners>
131
-
<addname="wcfTraces"
132
-
type="System.Diagnostics.XmlWriterTraceListener"
133
-
initializeData="c:\logs\PADwcfTraces.svclog" />
134
-
</listeners>
135
-
</source>
136
-
</sources>
137
-
<traceautoflush="true" />
138
-
</system.diagnostics>
139
-
```
127
+
:::image type="content" source="media/direct-connectivity-troubleshooting/added-config-section.png" alt-text="Screenshot of the config section that should be inserted into the correct location.":::
140
128
141
-
- You can substitute the `c:\logs\PADwcfTraces.svclog` value with any valid path you'd like but the folder (`c:\logs` in this example) must exist, otherwise it won't be created and logs won't be written.
142
-
- The Power Automate service must have permission to write in the chosen folder, granting the 'Everyone' user full control over the folder works. You can get the service user's Sid by running `sc showsid UIFlowService` in a command line if you want to give permissions to only that user.
129
+
```xml
130
+
<system.diagnostics>
131
+
<sources>
132
+
<source name="System.ServiceModel"
133
+
switchValue="Information,ActivityTracing"
134
+
propagateActivity="true">
135
+
<listeners>
136
+
<add name="wcfTraces"
137
+
type="System.Diagnostics.XmlWriterTraceListener"
138
+
initializeData="c:\logs\PADwcfTraces.svclog" />
139
+
</listeners>
140
+
</source>
141
+
</sources>
142
+
<trace autoflush="true" />
143
+
</system.diagnostics>
144
+
```
143
145
144
-
This config section needs to be added between \</system.net> and \<appSettings>, see the following screenshot:
146
+
- You can substitute the `c:\logs\PADwcfTraces.svclog` value with any valid path you'd like but the folder (the `c:\logs` in this example) must exist, otherwise it won't be created and logs won't be written.
147
+
- The Power Automate service must have permission to write in the chosen folder, granting the 'Everyone' user full control over the folder works. You can get the service user's Sid by running `sc showsid UIFlowService` in a command line if you want to give permissions to only that user.
145
148
146
-
:::image type="content" source="media/direct-connectivity-troubleshooting/added-config-section.png" alt-text="Screenshot of the config section that should be inserted into the correct location.":::
149
+
3. After saving the config file, restart the Power Automate service.
147
150
148
-
After saving the config file, restart the Power Automate service. This can be done in the Services tool. The tool can be found by typing _services_ in the start menu, finding Power Automate Service, right-clicking it and choosing **Restart**. The following screenshot shows the step to restart the Power Automate service:
151
+
1. Open the Windows Services tool (search for "services" in the **Start** menu).
152
+
2. Find **Power Automate service**, right-click, and select **Restart**.
149
153
150
-
:::image type="content" source="media/direct-connectivity-troubleshooting/restart-power-automate-service.png" alt-text="Restart the Power Automate Service in the Services tool.":::
154
+
:::image type="content" source="media/direct-connectivity-troubleshooting/restart-power-automate-service.png" alt-text="Restart the Power Automate Service in the Services tool.":::
151
155
152
-
Traces will then be written to the file chosen in the config.
156
+
Traces will be saved to the specified file, providing detailed logs to diagnose connectivity issues.
0 commit comments