Skip to content

AADSTS50011: Reply URL does not match

Short answer: AADSTS50011 means the redirect (reply) URI in the sign-in request doesn't exactly match one registered for the application. It is almost always a configuration mistake: http instead of https, a trailing slash, a wrong port. The exact-match rule is also what stops attackers redirecting authorization codes and tokens to their own server.

At a glance
CodeAADSTS50011
Microsoft nameInvalidReplyTo
CategoryApp configuration
TypeFailure
Attack signalLow: usually configuration or user error
MITRE ATT&CKT1528 Steal Application Access Token
Where to lookSigninLogs
Microsoft lookuplogin.microsoftonline.com/error?code=50011

InvalidReplyTo: The reply address is missing, misconfigured, or doesn’t match reply addresses configured for the app. As a resolution ensures to add this missing reply address to the Microsoft Entra application or have someone with the permissions to manage your application in Microsoft Entra IF do this for you.

(The wording, including “IF”, is Microsoft’s.) The troubleshooting article shows the message users see:

The reply URL does not match the reply URLs configured for the application . Make sure the reply URL sent in the request matches one added to your application

For SAML apps, the article names the cause as the AssertionConsumerServiceURL in the request not matching the Reply URL configured on the app.

Almost always not. The common causes are small differences between what the app sends and what is registered:

  • http:// vs https://
  • a trailing slash, or a different path or port
  • a new environment (staging, a new hostname) that was never added to the app registration
  • a SAML app whose service provider sends a different ACS URL than the one configured

The security point is the control behind the error. Entra ID only sends an authorization code or token to a redirect URI the app owner registered. If that check were loose, an attacker could send a victim a sign-in link with their own server as the redirect and collect the code or token. 50011 is that check refusing.

Pattern Likely meaning
Errors right after a deployment or hostname change Missing reply URL. Benign.
One app, one wrong URI, many users App misconfiguration. Benign, but users are blocked.
One app, many different redirect URIs, from one IP or a few users Someone testing which redirect values the app accepts. Investigate.
50011 for an app ID you don’t recognise Check whether the app is yours at all. See also 700016.

The probing pattern is our reasoning about how an attacker would look for a lax reply URL. Microsoft’s troubleshooting article doesn’t discuss security implications.

50011 per app per day, to spot misconfigurations after changes:

SigninLogs
| where TimeGenerated > ago(14d)
| where ResultType == "50011"
| summarize Users = dcount(UserPrincipalName),
Attempts = count(),
IPs = dcount(IPAddress)
by AppDisplayName, AppId, bin(TimeGenerated, 1d)
| sort by TimeGenerated desc, Attempts desc

Few sources, many attempts against one app:

SigninLogs
| where TimeGenerated > ago(7d)
| where ResultType == "50011"
| summarize Attempts = count(),
Apps = dcount(AppId),
AppNames = make_set(AppDisplayName, 5),
Users = make_set(UserPrincipalName, 5),
UserAgents = make_set(UserAgent, 5)
by IPAddress
| sort by Attempts desc

The sign-in logs don’t record the redirect URI that was sent, as far as the documented SigninLogs columns show. To see the exact value, use the error page or the request itself (browser developer tools, or the app’s own logs). Volume and source are what you can hunt on in the logs.

  • 50011 is not a Conditional Access result. The request fails on application configuration before a token can be issued.
  • Conditional Access doesn’t protect against a lax reply URL. If an app registration accepts a redirect URI you don’t control, a user who completes sign-in, MFA and device checks still sends the code to that URI. Review the registered reply URLs as part of app hygiene.

For the user: this isn’t something you can fix. Report the app name and the time to IT or the app owner.

For developers and admins:

  1. Read the redirect URI from the failing request and compare it character for character with the app registration (Authentication for OIDC/OAuth apps, Basic SAML configuration > Reply URL for SAML apps).
  2. Add the exact URI the app uses. Don’t add a broad or wildcard pattern to make the error go away.
  3. Remove reply URLs for environments that no longer exist. A registered URI on a domain you let expire can be taken over and used to receive codes (reasoning, not a Microsoft statement).

Sources

  1. Microsoft Entra authentication and authorization error codes
  2. Troubleshoot error AADSTS50011 (reply URL mismatch)
  3. SigninLogs table reference (Azure Monitor)