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 / Power Automate The req...
Power Automate
Answered

Power Automate The request failed. Error code: '502'. Error Message: 'BadGateway'.

(1) ShareShare
ReportReport
Posted on by 15
Categories:
I have the same question (0)
  • sandeepstw Profile Picture
    312 Moderator on at

    Hi There,

     

    The error code 502 usually indicates a "Bad Gateway" error. For an Approval flow in Power Automate, this can happen due to temporary issues with the service. You can do following things -

    Start by attempting to manually trigger or run the failed flow instance again to see if the issue was transient. Review the Microsoft 365 admin center service health dashboard for any known issues with Power Automate or associated services. Analyze the specific step or action that failed within the flow for any additional error details or messages.

     

    Please give kudos and mark as solution if it helps.  

      

    Thanks, 

  • AstroNorman Profile Picture
    15 on at

    Hi @sandeepstw 

     

    All Power automate services are healthy according the admin health dashboard.

     

    My errors and all the errors encountered by other user is related to Approval Attachment field.

     

    AstroNorman_0-1694415458596.png

     

  • sandeepstw Profile Picture
    312 Moderator on at

    Hi There,

     

    If the error is specifically tied to the Approval Attachment field, consider the following solution. Ensure that the attachments being sent for approval aren't exceeding the size limits. The attachment size should be below the maximum threshold.

    Sometimes, specific attachments might be corrupted or not fully uploaded. Ensure the integrity of these attachments before they are sent for approval.

    Try adding a delay before the Approval action in your flow to ensure all previous actions have fully completed.Reconfigure the Approval action, ensuring all necessary fields are correctly filled out, especially the attachment field.

     

    Please give kudos and mark as solution if it helps.  

      

    Thanks, 

    Sandeep Mishra 

  • AstroNorman Profile Picture
    15 on at

    The per attachment max size limit configured is 10 MB in my environment.

     

    The combined total size of all the attachments for 1 of my failing flow is 8 MB which is under Approval connector 50 MB limit.

     

    I had raise a ticket to Microsoft Support. Thanks for the info though.

  • Verified answer
    AstroNorman Profile Picture
    15 on at

    microsoft support answer.png

    According to Microsoft Support, the issue is affecting Asia region.

  • b1324 Profile Picture
    17 on at

    If you approval has attachments .. make sure to check this off in Admin Center -> Security Roles.

     

    This worked fine for me as well for months now, but something just changed at MS last week and this broke until this fix here.

     

    approvals.png

  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Hi, there was some information published about this on the 'Known issues' section of power platform admin portal, but this section is only currently available in the US.

     

    Details for the problem and workaround until they resolve the issue are the following:

     

     

    Problem

    You might encounter a BadGateway, 502, XrmApiServerError, 'Request to XRM API failed', or 'Principal user is missing prvReadAsyncOperation privilege' error when creating an approval.

     

    Workaround

    We are working on a fix for this issue.  In the meantime, you can resolve this issue by granting the "Approvals Administrator" role the missing privilege in the environment (please note that these actions need to be performed by an administrator). 

    To grant the "prvReadAsyncOperation" privilege:

    1. Go to Power Platform Admin Center (admin.powerplatform.microsoft.com)
    2. Select Environments
    3. Select the environment in which the error occurs
    4. Select Security Roles > See All
    5. Click the ellipsis (...) next to Approvals Administrator and select Edit
    6. Search for "asyncoperation" (aka "System Job") table (select "Show all tables" if not visible)
    7. Update the read permission to "Organization"

     

    Cheers,

    Sancho

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 862

#2
Valantis Profile Picture

Valantis 738

#3
Haque Profile Picture

Haque 553

Last 30 days Overall leaderboard