web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Unable to connect Clou...
Power Automate
Answered

Unable to connect Cloud flow to on-prem gateway. BadGateway error

(0) ShareShare
ReportReport
Posted on by 145

I set an on-prem gateway on my Windows 10 laptop to enable Cloud flow to connect to Desktop flow. Everything went well in the setup and the gateway diagnostics have no errors. However, when creating the connection to the gateway, Flow shows this error: 

    Test connection failed. Details: Connection failed: BadGateway. 

The on-prem gateway error file called GatewayErrors has this error line:

  DM.EnterpriseGateway Error: 0 : 2021-01-06T15:35:14.5283151Z DM.EnterpriseGateway 4908a6a8-5dfb-49a9-b8be-8dea8c8c46f5 00000000-0000-0000-0000-000000000000 MDSR 00000000-0000-0000-0000-000000000000 13f9566c-e055-41bb-b1bc-549c68e078ec 40000cd8-825f-4a63-aa76-97e027c0f7e1 B0247E47 [DM.Pipeline.Common] EnsureGatewayPipelineException encountered a non-GatewayPipelineException: System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it [::1]:4723
at System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult)

 

What does it mean the "target machine actively refused it" ? I am running everything on one laptop for which I have local admin rights. Any clue how to make this connection work?

I have the same question (0)
  • Verified answer
    joshd111 Profile Picture
    145 on at

    After many attempts, I have this figured out.

    1) Two of my services were not running: UIFlogLogShipper, UIFlowService.  This resolved the error I reported above. 

    2) After resolving #1, then it didn't like my credentials. Turns out the PAD connection requires the credentials for my laptop system, not the gateway credentials as I expected

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 276 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard