Share via

Oauth response url is adding port 80 to an https url

Nathaniel Bujalance 101 Reputation points
2021-05-04T15:32:17.863+00:00

Hello,

I have a url declared as redirect URI that works fine with my Oauth2 integration on a dev environment, but when trying the same on my production one, with the corresponding redirect URI declared in a similar fashion (https://sandbox.apps.ndd.tld/url.php), but it is returned as https://sandbox.apps.ndd.tld:80/url.php by login.microsoftonline.com.

The error returned is: AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: '79be0823-bf61-4d46-9457-e75fa3067d2c'.

Here is a capture:

Request Id: 1922baf4-e06b-4748-903a-5a8bb461be00
Correlation Id: bf4fa000-f027-4c7c-bbe5-10c2dfdeef03
Timestamp: 2021-05-04T15:29:51Z
Message: AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: '79be0823-bf61-4d46-9457-e75fa3067d2c'.

I don't understand why the port 80 is added, especially since the URL declared is using SSL.

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.


Answer accepted by question author

Nathaniel Bujalance 101 Reputation points
2021-05-06T18:39:17.96+00:00

Hi @Ryan Hill ,

Thanks for following up. I found the issue: my host is behind a reverse proxy with SSL offloaded. The https flag is on but the traffic is coming through port 80, which is a scenario the tool I use to build my flows doesn't support. A few changes on the code allowed to account for this type of configuration.

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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