Open dignifi-richard opened 2 years ago
Hi @dignifi-richard, We're just going through old issues, sorry for the lack of response. Did you end up porting it to FastAPI? The code for this sample is actually a lot simpler now, as it's using a higher level package, identity, instead of msal.
Yes, thank you @pamelafox. We ported to FastAPI with the msal package. I'd like to see the updated code that you mention. Can you point me in the right direction?
Great to hear you were able to get it working on FastAPI!
The change is here in the master branch of this repo:
https://github.com/Azure-Samples/ms-identity-python-webapp/blob/master/app.py
The configuration is the same, but the identity package handles underlying msal commands.
I also just found someone published their FastAPI msal sample a few years ago, linking it here for anyone who finds this issue: https://github.com/AzureAD/microsoft-authentication-library-for-python/issues/448
Also potentially useful, this msal plugin for FastAPI: https://github.com/dudil/fastapi_msal
Has anyone ported this exact example to FastAPI as an MVC app (as opposed to just API)? Seems like a super simple example and it works great in Flask but it's giving me fits in FastAPI. I can get it to log in but having issues accepting the token at the call back URI. Does anyone have an example of this in FastAPI, or willing to put a quick example together? I'd be grateful.