Troubleshooting
Anywhere
Fixing AADSTS50011: The Redirect URI Does Not Match the Application
7 min
when signing in to an application using azure active directory, you may encounter this error adsts50011 the redirect uri '\<your app uri>' specified in the request does not match the redirect uris configured for the application this means the uri your app is using to handle the sign in response does not match any of the redirect uris configured in the azure ad app registration why this happens this typically occurs when the redirect uri in your application configuration differs from what is set in azure ad you are using a local development uri (e g , https //localhost\ port) or a custom hostname (e g , https //server local\ port) not registered in azure ad how to fix it 1\ check the redirect uri in the error the error message will show the redirect uri sent by the app for example https //server 8699/signin oidc anywhere 2\ add the redirect uri in azure ad sign in to the azure portal go to entra id > app registrations open the affected application under authentication , find redirect uris add the exact uri shown in the error (including protocol, host, port, and path) click save 3\ ensure https is used azure ad requires https for all redirect uris (except http //localhost for development) 4\ retry sign in after saving the changes, try signing in again additional notes if you have multiple environments (dev, test, prod), add all required redirect uris to the app registration for local development , you can use http //localhost with a port, but production must always use https