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 / I cant attach an a fil...
Power Automate
Answered

I cant attach an a file in Approvals - "BadGateway" - Error Code 502

(0) ShareShare
ReportReport
Posted on by 13

Im refering a flow that was a runnig correcty, but now get this error

 

AndresFRA_0-1694192599681.png

Can anybody help me?

 

Categories:
  • Michael E. Gernaey Profile Picture
    53,970 Super User 2026 Season 2 on at

    Hello,

     

    Here are some things to double check.

     

    • Verify the full path that is being used to access the file you want to attach.
      • Make sure the path is accessible
      • Make sure the file name is correct
      • Make sure the file is not locked
      • Verify size of file
    • Make sure that permissions have not changed on the file.
    • Make sure the flow still runs as a user that has permissions.
    • Access the file yourself and verify you can.
    • If you are using any form of gateway/vpn/virtual network, make sure you can still access it properly from your tenant/subscription/flow

    Please let me know if you have checked all of these and still having an issue.

    Cheers
    --------------------------------------------------------------------------------
    If I had answered your question, please mark your post as Solved
    If you like my post please give it a thumbs up
    Thanks
    Michael
    https://gernaeysoftware.com

  • Verified answer
    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

  • Verified answer
    AndresFRA Profile Picture
    13 on at

    Hello! Finally I was able to solve the problem, the problem was due to the permissions granted on "Approvals Administrator"

     

    I found this tutorial in power platform known errors:

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

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 233 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 227 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 178

Last 30 days Overall leaderboard