Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In WAM flow, MFA is not cached for non-home tenant #704

Open
jiasli opened this issue May 21, 2024 · 2 comments
Open

In WAM flow, MFA is not cached for non-home tenant #704

jiasli opened this issue May 21, 2024 · 2 comments
Assignees

Comments

@jiasli
Copy link
Contributor

jiasli commented May 21, 2024

Describe the bug
In WAM flow, MFA is not cached for non-home tenant.

To Reproduce
In the browser flow, MFA information is cached (possibly by cookies), meaning that no MFA is required when running az login again.

az config set core.enable_broker_on_windows=false
az login --tenant 54826b22-38d6-4fb2-bad9-b7b93a3e9c5a  # MFA required
az account clear
az login --tenant 54826b22-38d6-4fb2-bad9-b7b93a3e9c5a  # No MFA required

However, with WAM, MFA information is not cached, meaning that MFA is required when running az login again:

az config set core.enable_broker_on_windows=true
az login --tenant 54826b22-38d6-4fb2-bad9-b7b93a3e9c5a  # MFA required
az account clear
az login --tenant 54826b22-38d6-4fb2-bad9-b7b93a3e9c5a  # MFA required

Expected behavior
The behaviors for WAM flow and browser flow should be consistent.

What you see instead
The behaviors for WAM flow and browser flow are not consistent.

The MSAL Python version you are using

> pip list | Select-String msal

msal                                    1.28.0
msal-extensions                         1.2.0b1
pymsalruntime                           0.14.2a1

Additional context
Add any other context about the problem here.

@jiasli
Copy link
Contributor Author

jiasli commented May 21, 2024

I am not sure which of my operations affected it, but I am not able to reproduce it now. I can't trigger MFA in WAM anymore.

@rayluo
Copy link
Collaborator

rayluo commented May 21, 2024

I am not sure which of my operations affected it, but I am not able to reproduce it now. I can't trigger MFA in WAM anymore.

I do not know enough MsalRuntime and WAM details to speak on that. I can just share my personal experience that I also occasionally ran into similar situation. It feels like the underlying cache does not immediately store the SSO and/or MFA state.

Regardless, let's tag @iulico-1 @ashok672 , @fengga for awareness.

@ashok672 ashok672 added the ado tracked in ado label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants