AADSTS50011 - Getting "Invalid redirect URI" despite having it registered

2023-11-06T05:24:25.6+00:00

In Azure AD I have created an application and mentioned 2 redirect URIs for one it redirects correctly, and other it throws an invalid redirect_URI error.

The request URL sends redirect_uri as parameter and it exactly matches the URI registered in Azure AD, still the error message only suggests issue is with redirect_uri what can be the possible cause?

Thank you in advance.

Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

1 answer

Sort by: Most helpful
  1. James Hamil 27,221 Reputation points Microsoft Employee Moderator
    2023-11-06T21:36:15.6933333+00:00

    Hi @Yadav, Priyesh (ext) (DI SW GS&CS GS&S GDN OP) , please check the following for me and let me know your results:

    1. Make sure that the redirect URI in the request is URL-encoded and matches the registered redirect URI exactly, including the protocol (http or https), domain, and path. Note that the redirect URI is case-sensitive.
    2. Check that the redirect URI is registered for the correct application in Azure AD. If you have multiple applications registered, make sure that you are using the correct client ID and tenant ID.
    3. Verify that the redirect URI is enabled for the application in Azure AD. To do this, go to the Azure portal, select the application, and navigate to the "Authentication" tab. Make sure that the redirect URI is listed and marked as "Enabled".
    4. Check that the redirect URI is not using a wildcard or a non-standard scheme. Azure AD only supports redirect URIs that use the https scheme and a fully qualified domain name (FQDN).
    5. If you are using a custom domain name, make sure that it is correctly configured in Azure AD and that the redirect URI uses the custom domain name instead of the default domain name.
    6. If you are using a load balancer or reverse proxy, make sure that it is correctly configured to forward the request to the correct server and that the redirect URI is correctly configured on the server.

    Please let me know if you have any questions and I can help you further.

    If this answer helps you please mark "Accept Answer" so other users can reference it.

    Thank you,

    James

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.