Closed AncestorComposition closed 1 year ago
To Reproduce Steps to reproduce the behavior: Follow the directions at https://learn.microsoft.com/en-us/azure/active-directory/develop/web-app-quickstart?pivots=devlang-python&tabs=windows
That link alone is not enough for us to reproduce your issue. In fact, we tested those steps before we published that doc.
Would you mind sharing your setting i.e. the .env
file (except the CLIENT_SECRET)? Also, I believe you modified the sample. What changes did you make?
Hello,
The .env file has just three lines that are not comments (I omitted the actual CLIENT_ID, CLIENT_SECRET, and tenant ID): CLIENT_ID=[ID of the application registered in the Azure Portal] CLIENT_SECRET=[client secret of the application] AUTHORITY=https://login.microsoftonline.com/[tenant ID for my company]
The only other change I made to the sample was to change the REDIRECT_PATH in app_config.py to match the redirect URI which is in Azure Portal for the registered application.
Thank you for your help.
Here is the full traceback:
I resolved the problem. The problem was due to the fact that the callback URI was http://localhost, creating a clash between @app.route(app_config.REDIRECT_PATH) and @app.route("/")
Describe the bug The sample application returns an error with code=flow["device_code" on line 1973 of application.py in acquire_token_by_device_flow
To Reproduce Steps to reproduce the behavior:
Expected behavior Application should run without errors
What you see instead The sample application returns an error with code=flow["device_code" on line 1973 of application.py in acquire_token_by_device_flow
The MSAL Python version you are using Paste the output of this 1.22.0