---
title: Fixing AADSTS50011: The Redirect URI Does Not Match the Application
slug: fixing-aadsts50011-the-redirect-uri-does-not-match-the-application
createdAt: 2025-08-05T23:33:25.138Z
---

#

When signing in to an application using Azure Active Directory, you may encounter this error:

:::BlockQuote
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:

:::BlockQuote
https\://server:8699/signin-oidc-anywhere
:::

### 2. Add the Redirect URI in Azure AD

1. Sign in to the Azure Portal.
2. Go to **Entra ID** > **App registrations**.
3. Open the affected application.
4. Under **Authentication**, find **Redirect URIs**.
5. Add the exact URI shown in the error (including protocol, host, port, and path).
6. 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.

