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 / Bad Gateway error on s...
Power Automate
Answered

Bad Gateway error on sFTP - SSH connector

(1) ShareShare
ReportReport
Posted on by 149
I'm trying to configure a sFTP - SSH connector in PowerAutomate.
 
The sFTP is hosted on our own servers and we've implemented IP whitelisting in our Fortinet firewall. We have whitelisted the IPs that are listed here under our tenancy (Europe): Connectors outbound IP addresses | Microsoft Learn
 
Sometimes it works, but other times it gives a Bad Gateway error. This gives me the idea that it's really a network access issue which is most likely related to the IP whitelisting. The detailed error is:
"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond"
 
This is the full response in the errorred action:
{
    "statusCode": 504,
    "headers": {
        "Cache-Control": "no-store, no-cache",
        "Pragma": "no-cache",
        "Set-Cookie": "ARRAffinity=c49a02f223fc273d9fae6ff170366e8c1535321eb63d6481d20fde0685aa9b7d;Path=/;HttpOnly;Secure;Domain=sftpwithssh-ne.azconn-ne-002.p.azurewebsites.net,ARRAffinitySameSite=c49a02f223fc273d9fae6ff170366e8c1535321eb63d6481d20fde0685aa9b7d;Path=/;HttpOnly;SameSite=None;Secure;Domain=sftpwithssh-ne.azconn-ne-002.p.azurewebsites.net",
        "Strict-Transport-Security": "max-age=31536000; includeSubDomains",
        "x-ms-datasourceerror": "True",
        "x-ms-request-id": "2e83195d-8d05-4a64-80dc-b8a97677fb91",
        "X-Content-Type-Options": "nosniff",
        "X-Frame-Options": "DENY",
        "x-ms-tenant-id": "<redacted>",
        "Timing-Allow-Origin": "*",
        "x-ms-apihub-cached-response": "false",
        "x-ms-apihub-obo": "false",
        "Date": "Thu, 22 Aug 2024 13:49:01 GMT",
        "Content-Length": "796",
        "Content-Type": "application/json",
        "Expires": "-1"
    },
    "body": {
        "error": {
            "code": 504,
            "source": "europe002-002.azure-apihub.net",
            "clientRequestId": "2e83195d-8d05-4a64-80dc-b8a97677fb91",
            "message": "BadGateway",
            "innerError": {
                "status": 504,
                "message": "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond\r\nclientRequestId: 2e83195d-8d05-4a64-80dc-b8a97677fb91",
                "error": {
                    "message": "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond"
                },
                "source": "sftpwithssh-ne.azconn-ne-002.p.azurewebsites.net"
            }
        }
    }
}
 
I'm not sure how to proceed with troubleshooting. Pinging the source of the error message (sftpwithssh-ne.azconn-ne-002.p.azurewebsites.net) gives an IP that's not in any ranges of Microsoft's documentation, so I also don't know how I can find the actual outbound IP address PowerAutomate is using.
 
 
Categories:
  • Verified answer
    Maarten_DIF Profile Picture
    149 on at
    This turned out to be an IP whitelisting issue. After going nuts for a couple of weeks in a row, I had the network team go through the IP whitelist rules one by one with me and we found a typo in one of the ranges.

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

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 307 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 289

#3
Henil Profile Picture

Henil 127

Last 30 days Overall leaderboard