Azure AD App Registration Redirect URI Issue

Launa Chavez 40 Reputation points
2025-11-14T12:25:24.7066667+00:00

I’m a university student trying to finish a homework assignment that requires building a small web app using (Azure AD). I’m stuck on something that feels really basic, but I can’t figure it out.

I created an App Registration in Azure AD, and I’m trying to sign in using MSAL. But whenever I run my local project, I get this error:

AADSTS50011: The redirect URI 'http://localhost:3000/auth/callback'

does not match the redirect URIs configured for the application.

The confusing part is… that IS the redirect URI I added in Azure.

I even tried removing and re-adding it. I also waited 10–15 minutes in case of caching, but the error keeps happening.

Here’s how my MSAL config looks:

const msalConfig = {
  auth: {
    clientId: <Removed for PII>,
    authority: "https://login.microsoftonline.com/common",
    redirectUri: "http://localhost:3000/auth/callback"
  }
};


I thought maybe it’s because I’m using /common, but switching to my tenant ID didn’t help either.

This assignment is due soon, and I’m stuck at the login page for hours.

Is there something obvious I’m missing

Microsoft 365 and Office | Development | Microsoft 365 Developer Program
0 comments No comments

Answer accepted by question author
Kha-N 8,265 Reputation points Microsoft External Staff Moderator
2025-11-14T12:58:31.1466667+00:00

Hi @LaunaChavez,

Welcome to Microsoft Q&A, and thank you very much for reaching out to us.

Please note that our forum is a public platform, and we will modify your question to hide your personal information in the description. Kindly ensure that you hide any personal or organizational information the next time you post an error or other details to protect personal data.

Based on your descriptions, as I checked, your redirect URI is http://localhost:3000/auth/callback

However, as I checked, based on this Microsoft Article on add redirect URI, the correct format would be http://localhost:3000/auth-response

User's image

I suggest you fix the typo in your configuration based on my suggestion and see if it able to work.

I hope this help. If you have any updates or issues when follow my suggestions, kindly let me know. I would love to assist you further.


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".     

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Was this answer helpful?


1 additional answer

Sort by: Most helpful
  1. AI answer

    2025-11-14T12:25:51.2366667+00:00

    It sounds like you're encountering the AADSTS50011 error due to a mismatch between the redirect URI specified in your application and the one configured in your Azure AD App Registration. Here are a few steps to troubleshoot this issue:

    1. Verify Redirect URI Configuration: Double-check that the redirect URI http://localhost:3000/auth/callback is correctly added to your app registration in the Azure portal. Ensure there are no typos or extra spaces.
    2. Check Application ID: Make sure that the clientId in your MSAL configuration matches the application ID in your Azure AD App Registration.
    3. Clear Browser Cache: Sometimes, cached data can cause issues. Try clearing your browser's cache or using an incognito window to see if that resolves the problem.
    4. Wait for Changes to Take Effect: After making changes in the Azure portal, it can take a few minutes for those changes to propagate. If you just made changes, give it some time before trying again.
    5. Use the Correct Authority: While using /common should generally work, you can try specifying your tenant ID in the authority URL as you mentioned, but ensure that it is formatted correctly.
    6. Check for Multiple App Registrations: If you have multiple app registrations, ensure you're modifying the correct one that corresponds to your application.

    If you've checked all of the above and are still facing issues, consider reviewing the detailed documentation on how to add a redirect URI and the restrictions that apply to them.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer 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.