Skip to content

Commit 94ef2a4

Browse files
authored
some changes
1 parent 0310837 commit 94ef2a4

File tree

1 file changed

+70
-66
lines changed

1 file changed

+70
-66
lines changed

support/power-platform/power-automate/desktop-flows/troubleshoot-direct-connectivity-issues.md

Lines changed: 70 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Direct connectivity issues in Power Automate for desktop
33
description: Provides more information about how to solve the direct connectivity issues in Power Automate for desktop.
44
ms.reviewer: guco, madiazor, johndund, qliu
5-
ms.date: 01/22/2025
5+
ms.date: 05/15/2025
66
ms.custom: sap:Desktop flows
77
---
88
# 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
1818

1919
#### Scenario 1
2020

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:
2323

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.
2726
2827
#### Scenario 2
2928

3029
- 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.)
3231
- The connection is re-established once a user signs back in to the machine.
3332

3433
#### Scenario 3
3534

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.
3736

3837
## Cause
3938

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.
4140

4241
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.
4342

@@ -48,105 +47,110 @@ The Power Automate service runs under its own Windows account (NT Service\UIFlow
4847
4948
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.
5049

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.
5251

5352
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.
5453

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).
5655

5756
Azure Relay requires to have all the relay gateways used by the primary and secondary namespaces allowed by the proxy and firewall configurations.
5857

5958
## How to investigate
6059

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.
6263

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.
6465

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.
6668

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).
6870

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).
7172

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.
7374

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:
7576

76-
To identify the namespaces used by a machine:
77+
**Step 1: identify the Azure relay namespaces**
7778

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:
8580

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.)
8787

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**
8989

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.
9191

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.
9393

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.
9595

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**
9797

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).
9999

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.
101101

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:
104103

105-
The result will be displayed as the output of TcpTestSucceeded.
104+
```powershell
105+
Test-netconnection \<ipaddress or dnsname> -port 443
106+
```
106107
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.
108109
109110
## What information to include when opening a support ticket
110111
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).
112115
- 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.
113116
- 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).
115118
- Desktop flow run IDs of impacted runs.
116119
- Local logs from the impacted machine: they can be extracted using the Power Automate machine runtime app's troubleshooting pane.
117120
118121
## Enable WCF tracing
119122
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.
121124
122-
Add this config section:
125+
2. Add the following configuration section between \</system.net> and \<appSettings>:
123126
124-
```xml
125-
<system.diagnostics>
126-
<sources>
127-
<source name="System.ServiceModel"
128-
switchValue="Information,ActivityTracing"
129-
propagateActivity="true">
130-
<listeners>
131-
<add name="wcfTraces"
132-
type="System.Diagnostics.XmlWriterTraceListener"
133-
initializeData="c:\logs\PADwcfTraces.svclog" />
134-
</listeners>
135-
</source>
136-
</sources>
137-
<trace autoflush="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.":::
140128
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+
```
143145
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.
145148
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.
147150
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**.
149153
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.":::
151155
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

Comments
 (0)