Hi @Jack Kelly ,
It sounds like you are accessing the the application using the http://127.0.0.1:5000 in the browser, so your redirect URI is getting changed to http://127.0.0.1:5000/getAToken . Since this entry does not exist in your Redirect URI configuration in the Azure AD App Registration, you are receiving the reply URL mismatch error.
There are a few things that should work to resolve this:
1) Access the application using http://localhost:5000
2) Force the host to be localhost at the application startup.
if __name__ == "__main__":
app.run(host="localhost")
3) Change the reply url configured In the authentication tab of the app registration to http://127.0.0.1:5000/getAToken
If these solutions do not work, feel free to reach out to me over email and I will gladly help troubleshoot. There was a thread here where a user was having a similar issue with the absolute URL in the Python sample.
-
If the information provided was helpful to you, please remember to "mark as answer" so that others in the community with similar questions can more easily find a solution.