Announcements
Hi,
From the details and the error message shared, this looks like a connector-related issue rather than a problem with your flow logic.
The error:
BadGateway (502) with inner error “An error was encountered while retrieving the user profile”
typically occurs when the OneDrive for Business connector is unable to resolve the user context or access the file, even though the file ID is passed correctly.
A few things you can try:
Recreate or refresh the connection Sometimes the connection token becomes invalid or cannot retrieve the user profile properly. Try:
Removing the OneDrive for Business connection
Re-adding it
Updating the flow to use the new connection
Verify file ownership and location Ensure that the file you are trying to access:
Exists in the same OneDrive account tied to the connection
Has not been moved or deleted
Is accessible by the account running the flow
Check permissions If the file is coming from Forms or another source, confirm that:
The account used in the flow has access to that file
There are no permission changes recently
Retry / transient issue Since this started suddenly and is affecting multiple flows, it could be a temporary service issue on the connector side. These 502/500 errors are often transient. You can:
Check if the flow succeeds on retry
Add retry policy or delay if needed
Test the action separately Try creating a simple flow with only:
Get file content to confirm whether the issue is reproducible outside this flow.
Based on similar cases, this issue is often related to connection context or temporary backend service errors, not the flow configuration itself.
Hope this helps.
If this helps resolve your issue, please consider marking the response as Verified so it can help others facing a similar scenario.
If you found this helpful, you can also click “Yes” on “Was this reply helpful?” or give it a Like.
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.
Jump in, show your community spirit, and win prizes!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Valantis 377
11manish 279
David_MA 234 Super User 2026 Season 1