Showing results for 
Search instead for 
Did you mean: 
Advocate I
Advocate I

SAP ERP Connector Setup - Bad Gateway

Dear forum members,


I try to setup and have read following blog


But I still cannot set it up, and keep on getting this error "BadGateway".

Anyone has hints where to see more info about this error message?





Community Support
Community Support

@hsu Could you please click on the three dot of the action to see whether the connection is in 'Connected' status? If the connection is not 'Connected' could you please recreate the connection. Please ensure the Gateway installed is the latest version.








Please mark my reply as a solution if you think it helps.

Thank you.


Best Regards,


Jessie Chen


Support Engineer

Asia Dynamics 365 Support

Customer Services and Support

Advocate I
Advocate I

Dear Jessie,


yes, the connection is showing connected. 


Any hints how to analyse this error?

Community Support
Community Support

Dear forum member,


Could you please click on one failed run and copy paste the flow run url to me?

It would be something like this:


Thank you.


Best Regards,



Frequent Visitor

Hi @shu ,

I have the same situation;

I tried with DEV, QS, PROD servers -> the result is same -> BadGateway;


GatewayError.log -> Unable to register Sap configSelect one of the installed languages (in SAP are 3 languages (LT, DE, EN)

On the other hand, in SAP there is no logged request from flow..



Frequent Visitor

Have someone figured out how to solve BadGateway errore message?

Thank you.



Advocate I
Advocate I

Dear fellow community members,


I have finally solved this issues.


In General what you need to check are:

  • Check the On Prem Gateway error log to get more details.
    • check the file GatewayErrors*.log
    • Check the file in: C:\Users\<user name>\AppData\Local\Microsoft\On-premises data gateway
  • Flow Parameters:
    • AD Host: SAP server hostname -> solved to IP address, by the Gateway
    • Client: SAP Client ID (or Mandant in German)
    • AS System Number: this is the SAP Instance No.
  • Your SAP system (check with the SAP Basis Admin)
    • Whether the SAP system is allowing the connection.
    • There is security reginfo/secinfo, which can prevent the connection to happen


If the connection is successful, the automatic completion of the SAP Function Name works, just like in the blog article:

Thanks for the hint.

In my GatewayErrors*.log I have: 

ERROR partner '' not reached

So maybe my SAP Basis Admin can check if SAP AS is reachable from my GW server.


I will check and let you know!


Opening these ports, as addressed by our SAP Basis Admin, on SAP Application Server solved the issue:









Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (3,283)