Power Automate
502 — Bad Gateway
The flow action failed with a 502 Bad Gateway error.
Root cause
The target service (e.g., SharePoint, SQL Server, custom API) took too long to respond, or the connector infrastructure experienced a temporary hiccup.
How to fix it
- This is often transient. Configure a Retry Policy in the action settings (Settings > Retry Policy).
- If querying a database or large SharePoint list, ensure the query is indexed and optimized so it returns faster.
Decode any M365 error
Paste an unfamiliar error message into the interactive decoder — it searches every code in this catalog and explains the cause in plain English.
Open the Error Decoder →