Entra ID sign-in error

AADSTS50011: Redirect URI does not match the app registration

AADSTS50011 means the redirect URI (reply URL) in the sign-in request is not registered for the app. How to find the mismatch and fix it for OIDC and SAML apps.

Last updated Checked against Microsoft Learn on Look up another code

AADSTS50011

App registrations and credentialsWho fixes it:App developerTenant admin

The reply address is missing, misconfigured, or doesn't match reply addresses configured for the app.

Microsoft's description (InvalidReplyTo), from the Microsoft Entra error code reference

What it means

The redirect URI (reply URL) in the sign-in request does not exactly match any redirect URI registered for the app, so Microsoft Entra ID will not send the token there. For OpenID Connect and OAuth 2.0 apps that is the redirect_uri parameter. For SAML apps it is the AssertionConsumerServiceURL in the SAML request, compared with the Reply URL configured for the enterprise application.

Fix it: tenant admins

  1. Copy the application ID and the redirect URI from the error message.
  2. In the Microsoft Entra admin center, open App registrations, find the app by that ID and select Authentication. The registered redirect URIs are listed there.
  3. If the URI in the error is a genuine address of the app, add it: on the Redirect URI configuration tab select Add Redirect URI, choose the platform and enter the URI. Older Microsoft articles call this Platform configurations > Add URI.
  4. Save, wait three to five minutes for the change to take effect, then sign in again. If the Microsoft Entra sign-in page does not appear, test in an InPrivate window.
  5. SAML apps: make the Reply URL configured in Microsoft Entra ID match the AssertionConsumerServiceURL the app sends. The right values come from the application's vendor.

Fix it: app developers

  1. If the URI your app sends is not the one you meant, fix the app's code or configuration. Registering the wrong URI only hides the problem.
  2. Compare the URI in the error with the registered one character by character: http or https, host, port, path and letter case. Redirect URIs are case-sensitive.
  3. The redirect_uri must match a registered URI exactly, apart from being URL-encoded in the request.
  4. Do not register a wildcard URI to make the error go away. Microsoft says wildcard URIs should be avoided because of their security implications.

Fix it: the person signing in

  1. You cannot fix this yourself. Send the app's support team or your IT team the full error message: it shows the application ID and the redirect URI they need.
  2. When they say it is fixed and the old error still shows, try again in an InPrivate (private) window. You do not need to delete saved passwords.

Related codes

Microsoft sources

Find who is hitting AADSTS50011

Sign-in logs record the code without the AADSTS prefix: as status/errorCode in Microsoft Graph S04 and as ResultType in the SigninLogs table in Log Analytics S05. The SigninLogs and Microsoft Graph queries below cover interactive sign-ins. Non-interactive sign-ins are in the AADNonInteractiveUserSignInLogs table, which documents the error code in ResultSignature S41. If you query that table, test ResultType as well. For one failed sign-in, paste its error message into the lookup to get queries for its Correlation ID.

Log Analytics (KQL), last 7 days

SigninLogs
| where TimeGenerated > ago(7d) and ResultType == "50011"
| summarize Failures = count(), Last = max(TimeGenerated) by UserPrincipalName, AppDisplayName
| sort by Failures desc

Microsoft Graph PowerShell, last 7 days

Connect-MgGraph -Scopes "AuditLog.Read.All"
$since = (Get-Date).ToUniversalTime().AddDays(-7).ToString("yyyy-MM-ddTHH:mm:ssZ")
Get-MgAuditLogSignIn -Filter "status/errorCode eq 50011 and createdDateTime ge $since" -All |
  Select-Object CreatedDateTime, UserPrincipalName, AppDisplayName, CorrelationId

Reading sign-in logs needs at least the Reports Reader role S06; the Graph call needs the AuditLog.Read.All permission S42, and -All returns every page of results S69.

Sources for this page

Microsoft's description is quoted from the Microsoft Entra error code reference; it is Microsoft's text and is not covered by our CC BY 4.0 licence. The cause and fix steps are our own wording, published under CC BY 4.0; each source below is the Microsoft page they rest on, with the passage we checked. Rules for every page are in the methodology.

  1. S13. Microsoft (Microsoft Learn), Error AADSTS50011: The redirect URI doesn't match (OpenID Connect and OAuth 2.0). Retrieved 2026-11-25.

    This error occurs if the redirect URI (reply URL) configured in the application (code) and the Microsoft Entra app registration don't match.

    On the app registration page, select Authentication. In the Platform configurations section, select Add URI to add the redirect URI displayed in the error message to Microsoft Entra ID.

    Save the changes and wait three to five minutes for the changes to take effect, and then send the login request again.

    If you don't see the Microsoft Entra login page, try clearing the password cache from your browser or use InPrivate browsing.

    If the redirect URI sent from the application isn't the desired one, you should update your application code or configuration.

  2. S14. Microsoft (Microsoft Learn), How to add a redirect URI to your application. Retrieved 2026-11-25.

    Redirect URIs are configured on the Authentication page in the Microsoft Entra admin center.

    On the Redirect URI configuration tab, select Add Redirect URI.

  3. S15. Microsoft (Microsoft Learn), Error AADSTS50011: The reply URL doesn't match (SAML). Retrieved 2026-11-25.

    The AssertionConsumerServiceURL value in the SAML request doesn't match the Reply URL value or pattern configured in Microsoft Entra ID.

    These values depend on what application is being used. You should get the values from the application vendor.

  4. S16. Microsoft (Microsoft Learn), Redirect URI (reply URL) best practices and limitations. Retrieved 2026-11-25.

    Redirect URIs are case-sensitive and must match the case of the URL path of your running application.

    Wildcard URIs like https://*.contoso.com may seem convenient, but should be avoided due to security implications.

    Microsoft Entra login servers only redirect users and send tokens to redirect URIs that have been added to an app registration.

  5. S26. Microsoft (Microsoft Learn), Microsoft identity platform and implicit grant flow. Retrieved 2026-11-25.

    It must exactly match one of the redirect URIs you registered in the Microsoft Entra admin center, except it must be URL-encoded.

  6. S04. Microsoft (Microsoft Learn, Microsoft Graph), signIn resource type. Retrieved 2026-11-25.

    Supports $filter (eq) on errorCode property.

    The request ID sent from the client when the sign-in is initiated. Used to troubleshoot sign-in activity.

  7. S05. Microsoft (Microsoft Learn, Azure Monitor), Azure Monitor Logs reference - SigninLogs. Retrieved 2026-11-25.

    Provides the 5-6 digit error code that's generated during a sign-in event. 0 indicates success; other values are failures.

    The identifier that's sent from the client when sign-in is initiated.

  8. S06. Microsoft (Microsoft Learn), How to troubleshoot sign-in errors. Retrieved 2026-11-25.

    Reports Reader is the least privileged role required to access the activity logs.

    any user can access their own sign-ins from https://mysignins.microsoft.com.

  9. S41. Microsoft (Microsoft Learn, Azure Monitor), Azure Monitor Logs reference - AADNonInteractiveUserSignInLogs. Retrieved 2026-11-25.

    Contains the error code, if any, for the sign-in operation.

  10. S42. Microsoft (Microsoft Learn, Microsoft Graph), List signIns. Retrieved 2026-11-25.

    To avoid having the request time out, apply the $filter parameter with a time range for which to get all sign-ins

    Sign-ins that are interactive in nature

  11. S69. Microsoft (Microsoft Learn, Microsoft Graph PowerShell), Get-MgAuditLogSignIn (Microsoft.Graph.Reports). Retrieved 2026-11-25.

    -All List all pages.

Back to the AADSTS Error Code Lookup · All 351 codes