Share via

AADSTS50011: The redirect URI 'https://www.m-tax.co.za/api/auth/callback/azure-ad' specified in the request does not match the redirect URIs configured

Millicent Kgakane 0 Reputation points
2026-03-11T13:37:30.3633333+00:00

I am trying to link my calendar to my website, when I sync to outlook, I get an error to fix my URI on App Registrations, this has been done, but still getting an error

Microsoft Security | Microsoft Entra | Microsoft Entra ID

3 answers

Sort by: Most helpful
  1. Raja Pothuraju 47,160 Reputation points Microsoft External Staff Moderator
    2026-04-06T09:24:14.9733333+00:00

    Hello @Millicent Kgakane,

    If you are still facing the issue, please following the resolution which was provided in below document.

    https://learn.microsoft.com/en-us/troubleshoot/entra/entra-id/app-integration/error-code-AADSTS50011-redirect-uri-mismatch#resolution

    0 comments No comments

  2. Danstan Onyango 3,996 Reputation points Microsoft Employee
    2026-03-12T11:31:08.01+00:00

    This just means you have a different value in redirect URIs from https://www.m-tax.co.za/api/auth/callback/azure-ad
    This error will show up even if there is a small typo in the redirect URI. Please share a screenshot of the current redirect uri section. Compare whats configured closely with https://www.m-tax.co.za/api/auth/callback/azure-ad

    0 comments No comments

  3. Sridevi Machavarapu 26,995 Reputation points Microsoft External Staff Moderator
    2026-03-11T15:19:02.84+00:00

    Hello Millicent Kgakane,

    This error (AADSTS50011) occurs when the redirect URI sent by your app doesn’t match what’s configured in Entra ID.

    Your request is using:

    https://www.m-tax.co.za/api/auth/callback/azure-ad
    

    Please check:

    • In Azure Portal → Entra ID → App registrations → Your app → Authentication, confirm this exact URL is added under Redirect URIs (Web)
    • Ensure there are no small differences (like http vs https, www, or a trailing /)
    • Make sure it’s configured under Web and changes are saved

    If you're using a framework (e.g., NextAuth), verify the base URL matches the same domain (https://www.m-tax.co.za), otherwise a different redirect URI may be generated.

    If the issue continues, check the redirect_uri in the browser’s Network tab (/authorize request) and compare it with what’s configured.

    Once both values are identical, the sign-in should work.


    Please share more details on your current scenario like the code that you are using, which authentication flow you used and in what type of platform redirect URI is added. If possible, please share Portal images here to understand this better.


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.