502 Bad Gateway Error for OAuth2 Callback on AWS Deployment

Harsh 5 Reputation points
2025-02-04T12:51:04.76+00:00

Experiencing a 502 Bad Gateway error when implementing the Microsoft Authentication flow. The entire flow works on the local machine, but an error occurs after deployment on AWS.

Redirect URL has HTTPS and it is correct.

{"message":"Service request error: Expecting value: line 1 column 1 (char 0)","status":"Bad Gateway","status_code":502,"timestamp":"2025-02-04T11:37:29.385445+00:00"}
Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
3,010 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.