Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

502 'BadGateway' when running UI flow for web from flow

(4) ShareShare
ReportReport
Posted on by

I am trying to run a simple UI flow by using 'Run a UI flow for web' connector in flow. I have the On-premise gateway, have the connection with it, can see it under Data -> Gateways and the connection under Data -> Connections is also there and connected.

When running the flow it takes about 2 minutes until it fails with 502 'BadGateway' error.

In On-premises data gateway App status is 'Online and ready to be used', under Diagnostics tab i run Network ports test and it shows 'Completed (Successful)'

I must say that I am doing it from freshly made Environment(Trial) since i wasn't able to get the Gateway connection on my Default environment (wasn't showing any gateways in dropdown).

Any advice?
Thanks!

  • Jaison1 Profile Picture
    5 on at
    Re: 502 'BadGateway' when running UI flow for web from flow

    Changing the config file worked for me as well.  However, it is worth noting that initially it didn't.  The process I went through is:

     

    - Open the config file as an Admin and change the property listed above

    - close the config file and close the UI Flow Gateway application from the system tray

    - Restart the UI Flow Gateway app

    - Open the Power Automate workflow calling the UI Flow

    - Delete the action calling the UI Flow for Web

    - Delete the connection

    - Re-add the action to call the UI Flow for Web and configure the connection

  • DerekHurley Profile Picture
    56 on at
    Re: 502 'BadGateway' when running UI flow for web from flow

    Hi @Anonymous , @Anonymous ,

     

    For my set up, I am testing the UI Flow on my desktop and I have the gateway installed and running on my laptop. I also have all of the fixes from the first post on this forum (@RyanBrubaker124) applied to the data gateway. After changing the UI Flows config file UI Flows are now working correctly for me. The reason I was getting the 'BadGateway' error before was because of a known error with Azure AD, changing the config file should fix this, if you are getting the error for the same reason.

  • Community Power Platform Member Profile Picture
    on at
    Re: 502 'BadGateway' when running UI flow for web from flow

    Hi @DerekHurley 

     

    Thank you for sharing detail however i have tried by changing the parameter to "false" it doesn't work for me .Let me know at your end.

     

    Regards,

    Raju Thadakamadla

  • Community Power Platform Member Profile Picture
    on at
    Re: 502 'BadGateway' when running UI flow for web from flow

    Hi @DerekHurley ,

     

    I do not have access to any other account and changing the Microsoft.Flow.RPA.Agent.exe.config file did not solve the problem for me. 😞

    Did changing the line in config file to false alone solve the issue for you?

  • Verified answer
    DerekHurley Profile Picture
    56 on at
    Re: 502 'BadGateway' when running UI flow for web from flow

    Hi @Anonymous ,

     

    I spoke with Microsoft about this issue, they are aware of it and gave this fix:

     

    "Product team mentioned that , unfortunately It is a known issue of UI Flow agent when user use AzureAD domain as their on premise machine windows auth.

    And they provided below work around to fix this issue.

     

    1. please use other school or work account domain if they has.

    Or

    1. please go to C:\Program Files (x86)\Microsoft UI flows\edit the file Microsoft.Flow.RPA.Agent.exe.config

    With below entries:

        <add key="Microsoft.Flow.RPA.Agent.EnforceWindowsAuth" value="false" />

    Only administrator can modify the files in that folder, so you need to run your text editor in Admin Mode to be able to edit them."

  • Jaison Profile Picture
    2 on at
    Re: 502 'BadGateway' when running UI flow for web from flow

    Same issue.  I'm guessing since this is in preview we wont get a response?

  • Community Power Platform Member Profile Picture
    on at
    Re: 502 'BadGateway' when running UI flow for web from flow

    Facing same issue 😟

  • dshamsi1 Profile Picture
    14 on at
    Re: 502 'BadGateway' when running UI flow for web from flow

    Same issue

  • DerekHurley Profile Picture
    56 on at
    Re: 502 'BadGateway' when running UI flow for web from flow

    Also same issue here, any update on how to fix?

  • Community Power Platform Member Profile Picture
    on at
    Re: 502 'BadGateway' when running UI flow for web from flow

    Same issues here.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,658 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow