You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm running into a login loop after following the instructions. After being redirected to the homepage (after successfully logged in), I was asked to login again.
Here's how it behaves currently:
Access the homepage of my site. Redirected to login.microsoftonline.com.
/.auth/login/aad/callback (the redirect URL I set) gets called, but redirected to /.auth/login/done. This got me confused. Where is the login/done endpoint registered? I couldn't find it in repo Azure-Samples/ms-identity-python. I checked the code. It's supposed to be redirected to the next_link (aka the homepage) directly, right?
The login/done page tells me I've successfully signed in. See the screenshot below. Then follow the link to the homepage.
The server returns OK 200, not 302 this time. But still the page is refreshed to login.microsoftonline.com and asks me to pick up an account again.
What I'm missing? I'm testing this directly on Azure. My setup is flask + uWSGI + Nginx.
Okay, /.auth/login/aad/callback is reserved and will be picked up by Azure instead of my app if easy auth is turned on. I turned it off and now the redirect endpoint of my app is called.
Now I have another problem about verifying the user auth code. I created a federated managed identity for my app. What should I pass to client_credential when constructing the Auth object? Is it the token acquired by acquire_token_for_client as illustrated in user-assigned-managed-identities?
Activity
krsfrodaslz commentedon Dec 23, 2025
Okay,
/.auth/login/aad/callbackis reserved and will be picked up by Azure instead of my app if easy auth is turned on. I turned it off and now the redirect endpoint of my app is called.Now I have another problem about verifying the user auth code. I created a federated managed identity for my app. What should I pass to
client_credentialwhen constructing the Auth object? Is it the token acquired byacquire_token_for_clientas illustrated in user-assigned-managed-identities?