Microsoft Entra ID is redirecting user to wrong reply url localhost:8080

blest 5 Reputation points
2024-08-29T15:34:10.29+00:00

I've an Azure Web App, with the following Single Page Application Redirect URIs:

https://dummy-portal.myorg.net/my-app
https://dummy-portal.myorg.net
https://dummy-portal.ppd.myorg.net/my-app
https://dummy-portal.ppd.myorg.net
https://dummy-portal.azure.myorg.net/my-app
https://ppd-dummy-portal.azure.myorg.net/my-app
http://localhost:8080/myApp

Once the user hits my web url, they are redirected to the MS Sign In page.

However for my preproduction deployment ppd; the user is being redirected to localhost:8080/my-app instead of the actual ppd url.

I've verified my Angular MSAL, and it's not with the code but Azure only. Please help me on the.

As of now my prod is working fine, and I'm really worried that it might get broke as well, as the preprod was also working fine for >2 years, and suddenly started this issue.

Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
240 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,646 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Sergio Andrés Vargas Acosta 75 Reputation points
    2024-08-29T16:56:53.9833333+00:00

    Hi.

    Ensure that the redirect URIs configured in Azure Entra ID for your application match the correct ones, particularly for the preproduction (ppd) environment. Verify that your Angular application's MSAL configuration aligns with the proper URIs for each environment, avoiding redirection to localhost:8080 unless it’s during local development.


  2. Bruce (SqlWork.com) 68,486 Reputation points
    2024-08-29T19:34:10.5166667+00:00

    when your app redirects to azure to login, it passes the redirect url. azure just validates the url is on the reply list, else it gives an error. so the issue is with your app.

    0 comments No comments

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.