AADSTS50011: The redirect URI specified in the request does not match the redirect URIs configured for the application.

thirumavalavan.kr 20 Reputation points
2025-02-28T11:46:07.64+00:00

I have sucessfully validated the custom domain in azure.

Binding Done.

Status Secured.User's image

But while accessing the URL it shows the blow error.

Seeking your support!

Request Id: c99723fa-8d40-493f-87aa-15171b4cb700

Correlation Id: fa0b4344-99b5-425f-8365-98e227d67c7c

Timestamp: 2025-02-28T06:07:47Z

Message: AADSTS50011: The redirect URI 'https://kauverygpt.com/.auth/login/aad/callback' specified in the request does not match the redirect URIs configured for the application '7368b9fd-a6e6-4354-9b33-e6ce1071fce7'. Make sure the redirect URI sent in the request matches one added to your application in the Azure portal. Navigate to https://aka.ms/redirectUriMismatchError to learn more about how to fix this.

Azure App Service
Azure App Service

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

0 comments No comments

Answer accepted by question author
Anonymous
2025-02-28T15:32:10.59+00:00

Hi thirumavalavan.kr,

welcome to Microsoft Q&A.

Since you have mentioned your custom domain and SSL configurations are correct and Secured and that the SSL certificate is active and valid. Then its good to go. note- Any discrepancy in the SSL setup can also cause redirect URI mismatches.

Ensure that the redirect URI specified in your Azure AD App Registration matches exactly with the one used in your application. Start by going to the Azure portal and navigating to Azure Active Directory > App registrations. Locate your application with the Application (Client) ID and select it. In the left menu, go to Authentication. Under Redirect URIs, make sure the following URI is added exactly as shown: https://kauverygpt.com/.auth/login/aad/callback If it’s not present, click Add a platform, select Web, input the URI, and Save the changes. It’s crucial to ensure the URI is an exact match, including the protocol (https://) and without any trailing slashes.

Next, clear your browser’s cache and cookies completely to eliminate any cached redirect URIs that could be causing conflicts. After clearing the cache, restart your browser and attempt to access the URL again. This step ensures that your browser is using the most recent redirect settings.

To further ensure that all configurations are refreshed, go to your App Service in Azure Portal and click on Restart. This action reloads all environment settings and should reflect any changes made to the authentication settings immediately. Once the app restarts, test the login flow again to see if the issue is resolved. Finally, double-check the application code in your .NET Core backend or React frontend. Ensure that the redirect URI is hardcoded or configured exactly as https://kauverygpt.com/.auth/login/aad/callbackThis match is case-sensitive and should not include any trailing slashes or extra characters.

If you have any further assistant, do let me know. 

If the answer is helpful, please click Accept Answer and kindly upvote it so that other people who faces similar issue may get benefitted from it.

Was this answer helpful?

0 comments No comments

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.