Share via

Error code: '502'. Error Message: 'BadGateway'. when Array Attachment Sent with Approval Request

Anonymous
2023-09-27T19:38:04+00:00

I've created several workflows that automatically send an approval request when a Form is submitted. The form provides the ability to upload a file as part of the submission process. The flow attaches the uploaded file to an MS List and to the Start and Wait for Approval request notification if a file is uploaded with the form. The uploaded file is still being pulled from the form submission and successfully attaching to the MS List that was created, but it fails when it gets to the Start and Wait for Approval step if there is a file attachment. The process runs fine if there is no file attached and all the workflows were running successfully with attachments until a few days ago, so I'm stumped as to what has changed or why I'm now getting the Error code: '502'. Error Message: 'BadGateway'. error message when I wasn't previously.

Microsoft 365 and Office | Install, redeem, activate | For business | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

  1. Anonymous
    2023-09-28T05:35:55+00:00

    Dear Jim,

    I'm following up on the thread with you.

    The flow is correct and I can reproduce the issue in our environment as well.

    Based on the thread Solved: Power Automate The request failed. Error code: '50... - Power Platform Community (microsoft.com), the error message is due to that the "Approvals Administrator" role has the missing privilege in the environment.

    I follow the steps as follows Sancho provided in Solved: Power Automate The request failed. Error code: '50... - Power Platform Community (microsoft.com) and the error message goes away in my environment.

    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"

    I suggest you give it a try in your environment as well. You need to contact the administrator to do that if you aren't the administrator.

    Thank you for your effort and time!

    Sincerely

    Cliff | Microsoft Community Moderator

    2 people found this answer helpful.
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2023-09-29T01:56:11+00:00

    Dear Jim,

    Thanks for your updates.

    If you are the administrator, what administrator role do you have?

    Please check whether you are the global administrator. If no and if there are other global administrator, I suggest you let other global administrator check whether they can see the default environment.

    Some other possible reason may be that the environment has been removed. I suggest you click on Recently deleted environments to see if the default environment is there and whether you can recover it.

    Can you see the environments/Default-guid part on your saved flow? If yes, I suggest you try the URL https://admin.powerplatform.microsoft.com/environments/environments/Default-**guid**/hub to see if you can access teh environment page in your environment.

    Thank you for your effort and time!

    Sincerely

    Cliff | Microsoft Community Moderator

    0 comments No comments
  2. Anonymous
    2023-09-28T15:51:14+00:00

    Hi Cliff,

    Thanks for the follow up and the info! When I go the Environments tab on the Power Platform Admin Center I have no Environments listed. I'll admit this is my first time using and building in Power Automate. Did I miss something as I started building and utilizing the workflows? Now that I have several workflows built, are they already stored somewhere that could be converted to an environment or can I easily build an environment and assign these workflows, if that is what is needed?

    0 comments No comments
  3. Anonymous
    2023-09-27T20:22:30+00:00

    Dear respected Jim 3737,

    Good day! Thank you for posting to Microsoft Community. We are happy to help you.

    I’m sorry you’re having a problem and for the situation you encountered, we deeply understand the inconvenience caused and apologize for it.

    As per your description, we may need more time to test it from our side, I request you, if possible, could you please allow me some time and I will update you here ASAP.

    Appreciate your patience and understanding and thank you for your time and cooperation.

    Sincerely,

    Waqas Muhammad

    0 comments No comments