Azure-Samples / ms-identity-python-webapp

A Python web application calling Microsoft graph that is secured using the Microsoft identity platform
MIT License
279 stars 133 forks source link

\authority.py", line 193, in canonicalize raise ValueError #137

Closed yekamu closed 1 month ago

yekamu commented 3 months ago

error message:

authority.py", line 193, in canonicalize raise ValueError(ValueError: Your given address () should consist of an https url with a minimum of one segment in a path: e.g. https://login.microsoftonline.com/{tenant} or https://{tenant_name}.ciamlogin.com/{tenant} or https://{tenant_name}.b2clogin.com/{tenant_name}.onmicrosoft.com/policy

I create a new conda environment, pip install -r, run: python -m flask run --debug --host=localhost --port=5000, and the error persist.

If I just run: python app.py , in the console appears: File "C:\Users\Miguel\miniconda3\Lib\site-packages\flask_session\sessions.py", line 329, in open_session sid = request.cookies.get(app.session_cookie_name) ^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'Flask' object has no attribute 'session_cookie_name'

in .env: I try several combinations of authority, but no change. actual: AUTHORITY=https://login.microsoftonline.com/TruthTalkerai

Thank you in advance!

rayluo commented 3 months ago

Sounds like a configuration issue and/or a dependency issue. It is hard to tell. But, we recently updated/simplified this sample a lot, and dividing the settings into 4 templates. Would you mind following our new README's Getting Started and try again?