invalid_request: The provided value for the input parameter 'redirect_uri' is not valid. The expected value is a URI which matches a redirect URI registered for this client application.

Avin Mathew 1 Reputation point
2020-12-14T12:02:57.32+00:00

I am creating a Single Sign-On(SSO) with the help of Azure AD and Django. I am using

Python==3.8
Django==3.1
django-microsoft-auth==2.4.0

I followed the tutorial on https://django-microsoft-auth.readthedocs.io/en/latest/usage.html

but i am getting this error when i try to login with the register email id after completeing the 10 steps

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

1 answer

Sort by: Most helpful
  1. JamesTran-MSFT 36,636 Reputation points Microsoft Employee
    2020-12-14T23:46:14.107+00:00

    @Avin Mathew
    Thank you for your post!

    Can you make sure the Redirect URI value that you added to your app, within step 3 is the same as within your app.
    48202-image.png

    If you added more URIs within step 5 and 6, can you make sure they're also saved to your app's redirect URI list.
    48221-image.png
    For more info - Redirect URI (reply URL) restrictions and limitations

    Since this is a Django doc that you referenced, you can also try reaching out to the Django Community Forums.

    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.


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.