AADSTS50011

Redirect URI mismatch

Last reviewed 2026-07-18 by the Just Software engineering team ยท also seen as 50011, redirect uri mismatch

What it means

AADSTS50011 โ€” "The redirect URI specified in the request does not match the redirect URIs configured for the application." Entra ID refuses to send tokens or codes to an address the app registration has not explicitly declared. The comparison is exact: scheme, host, port, path and trailing slash all count.

Common causes

  1. The URI was never added to the app registration (new environment, new hostname, moved from localhost to a deployed URL).

  2. Exact-match differences: http vs https, missing or extra trailing slash, different port, different casing in the path.

  3. The URI is registered under the wrong platform type (e.g. registered as Web while the app performs a SPA/native flow, or vice versa).

  4. Multiple environments (dev/test/prod) share one registration but only one environment's URI was added.

How to fix it

  1. Copy the redirect_uri value out of the failing request (it is shown in the error page/URL), then register exactly that string: Entra admin center > App registrations > (app) > Authentication > Add a redirect URI.

  2. Put the URI under the correct platform: Web for server-side code flows, Single-page application for browser PKCE flows, Mobile and desktop for native clients.

  3. For multi-environment apps, register every environment's URI (or use separate app registrations per environment).

Frequently asked

Does the redirect URI have to match exactly?
Yes — scheme, host, port, path and trailing slash are all compared. The only flexibility is that `http://localhost` allows arbitrary ports for native/dev flows. Copy the redirect_uri from the failing request and register that exact string.
An unhandled error has occurred. Reload ๐Ÿ—™