cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DanHansen
Frequent Visitor

BadGateway error 502 (access denied) in approval flows

Hello,

 

I see there are other posts about BadGateway, but none of them are similar to what I experience, therefore I am making a new post.

 

I have an approval flow, which fails after the approver has given his/her approval. I get the error, and I am not sure why, or what it means:

{
  "error": {
    "code": 502,
    "source": "flow-apim-europe-001-westeurope-01.azure-apim.net",
    "clientRequestId": "2df272d3-cb7e-4967-b99f-9cb02dc4a296",
    "message": "BadGateway",
    "innerError": {
      "status": 500,
      "message": "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))\r\nclientRequestId: 2df272d3-cb7e-4967-b99f-9cb02dc4a296\r\nserviceRequestId: b636d29e-d0f6-0000-9a1f-c7a46cf47bfc"
    }
  }
}

My flow is configured like this (I have deliberately only expanded the Approval condition, as this is where the flow fails):

Error1.pngError2.png

Error3.png

 

This error happens consistently, everytime someone approves. The users who initiate the workflow, have Edit permissions on the workspace, and the people that can Approve, have Owner permissions.

 

Any thoughts on the topic would be greatly appreciated.

 

Best regards,

Dan

1 ACCEPTED SOLUTION

Accepted Solutions
v-yamao-msft
Community Support
Community Support

Hi @DanHansen ,

 

Thanks for feedback.

 

According to your description, users who initiate the workflow have Edit permissions on the library. Please try to set users permission to Full control.

 

I have made some test on my side. At first, user has Edit permission to the library, when user select an item to trigger the flow, the same error message will be returned.

 

Then I set user permission to Full control, it then works successfully.

1.PNG2.PNG

 

Please take a try with it on your side.

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-yamao-msft
Community Support
Community Support

Hi @DanHansen ,

 

Thanks for feedback.

 

According to your description, users who initiate the workflow have Edit permissions on the library. Please try to set users permission to Full control.

 

I have made some test on my side. At first, user has Edit permission to the library, when user select an item to trigger the flow, the same error message will be returned.

 

Then I set user permission to Full control, it then works successfully.

1.PNG2.PNG

 

Please take a try with it on your side.

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thank you Mabel,

 

This was precisely what was needed to make the workflow function. It is a bit of a security risk for me, because I do not necessarily want the people who initiate this workflow, to be able to have full control over the workspace. But I will figure something out internally.

 

Best regards,

Dan

I'm having the same issue, and my account that I'm using for testing already has full control. It certainly seems poor security practice to exceed the minimal permissions for doing a check-in / approval request just to support "Flow" being able to do something.

 

{
"error": {
"code": 502,
"source": "flow-apim-msmanaged-na-northcentralus-01.azure-apim.net",
"clientRequestId": "<removed>",
"message": "BadGateway",
"innerError": {
"status": 500,
"message": "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))\r\nclientRequestId: <removed>\r\nserviceRequestId: <removed>"
}
}
}
DavidVoycer
New Member

Hey everyone,

 

i just ant to create a Flow for a reply for special Email. The reply contains a File from Onedrive.

 

The first two Steps work fine, Step 3 doesnt work.

 

Bild1_2.pngBild2.png

 

{
"error": {
"code": 502,
"source": "flow-apim-europe-001-westeurope-01.azure-apim.net",
"clientRequestId": "8023a74a-4b06-44a8-b72c-729eb596f3ae",
"message": "BadGateway",
"innerError": {
"status": 502,
"message": "Fehler bei der Anforderung. Versuchen Sie es später noch mal.\r\nclientRequestId: 8023a74a-4b06-44a8-b72c-729eb596f3ae\r\nserviceRequestId: ec2b1ca3-3cd1-4ff7-bdb6-c5825b1ada97",
"source": "office365-we.azconn-we.p.azurewebsites.net"
}
}
}
 
Hope somebody can help me fix this.
I´m a Flow Beginner.
 
Greetings,
David
 
Laslo
Frequent Visitor

Hello,

Just change the way the powerapps are run.

Not by the member but by the owner of the flow :

 

Capture.PNG

 

Powerapps.PNG

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (45,422)