Azure-Samples / ms-identity-python-webapp

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

_build_msal_app not working #45

Closed naimavahab closed 4 years ago

naimavahab commented 4 years ago

My application is in Flask framework. Here def _build_msal_app(cache=None, authority=None): app.logger.warning('_build_msal_app inside')

return msal.ConfidentialClientApplication(
    app_config.CLIENT_ID, authority=authority or app_config.AUTHORITY,
    client_credential=app_config.CLIENT_SECRET, token_cache=cache)

This function is not returning any value

App config is

CLIENT_SECRET = "123"

AUTHORITY = "https://login.microsoftonline.com/tenantid/v2.0" TENANT = "tenantid" CLIENT_ID = "clientid" REDIRECT_URI = "https://abc.123.com/register" SCOPE = [] SESSION_TYPE = "filesystem"

rayluo commented 4 years ago

Could you possibly mean you observe a different error or exception? Because, return ClassName(...) would always return a new object. That is a Python language feature. If you ever change the source code inside app.py, please revert to the out-of-the-box one we provided in this repo, just to rule out some other things.

rayluo commented 4 years ago

Closing due to inactivity. Feel free to reopen if you need help.