AADSTS50011: Reply URL error only for work users

Geralt Li 21 Reputation points
2022-12-09T09:47:17.693+00:00

The reply URL behaviour is different for Live/Hotmail/Outlook users compared to that of the work users.
Our app perfectly works for Live/Outlook/hotmail users, but for Office 365 Users we get a AADSTS50011 error.

The following is the relevant error message:

Request Id: 822f4be4-1c84-4505-b90d-57192bd3dd00
Correlation Id: b688c51b-f428-4bba-9d04-5497eb7464a1
Timestamp: 2022-12-09T09:39:01Z
Message: AADSTS50011: The redirect URI 'xxxx' specified in the request does not match the redirect URIs configured for the application 'xxxxx'. Make sure the redirect URI sent in the request matches one added to your application in the Azure portal. Navigate to https://aka.ms/redirectUriMismatchError to learn more about how to fix this.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,664 questions
0 comments No comments
{count} votes

Accepted answer
  1. JamesTran-MSFT 36,456 Reputation points Microsoft Employee
    2022-12-09T21:59:45.463+00:00

    @Geralt Li
    Thank you for your post and for sharing your error message!

    Error Message:
    AADSTS50011: The redirect URI 'xxxx' specified in the request does not match the redirect URIs configured for the application 'xxxxx'. Make sure the redirect URI sent in the request matches one added to your application in the Azure portal. Navigate to https://aka.ms/redirectUriMismatchError to learn more about how to fix this.

    From your error message details I looked into our logs, and the redirect URL that your application sent doesn't match any of the redirect URLs that're registered on your application.

    Redirect URL that your application sent:
    https://domain.name.com/api/.....?state=https://domain.name.com/en

    Application Registered URL:
    https://domain.name.com/api/.....

    --------------------------------

    To fix the issue - if the redirect URL that your application sent is correct, copy the URL value from the error message and add the redirect URL to your Azure AD Application. For more info - AADSTS50011 Resolution.

    If you have any other questions, please let me know.
    Thank you for your time and patience throughout this issue.

    ----------

    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.


1 additional answer

Sort by: Most helpful
  1. Carlos Solís Salazar 16,696 Reputation points MVP
    2022-12-09T12:54:53.45+00:00

    Hi @Geralt Li

    Thank you for asking this question on the **Microsoft Q&A Platform. **

    When you authenticate personal accounts, you are using an Azure AD Tenant that you don't control.

    However, when you use a work account, you must set the configuration for your App Registration (The App Registration with the ID indicate in the error message "application 'xxxxx'"), you must allow the URI specified in this part of the error messages "The redirect URI 'xxxx'"

    Hope this helps!

    ----------

    Accept Answer and Upvote, if any of the above helped, this thread can help others in the community looking for remediation for similar issues.