MFA not working properly in local

MFA is enabled in DEV tenant. Local version of the code and DEV environment share the same tenant.
When i try to run the application from local, it keeps asking for code but when i enter the code it says code is invalid.
It works in DEV.
It used to work before. I noticed the issue started after i accidentally removed the tenant settings for DEV in google authenticator.
Due to this, i’m not able to proceed with my development.

Hello!
Did you ever find a solution for this? I am in the same situation. Still getting same error.

Hello,

The issue is due to the removal of your DEV tenant MFA from Google Authenticator, causing invalid code errors. To fix it, reset your MFA in Azure AD, reconfigure it with Google Authenticator, and clear any local auth cache or tokens (e.g., MSAL or az login).

1 Like

Hi team,

Thank you for reaching out!

@brian159james’s advice should indeed help with clearing the issue, having a freshly setup MFA configuration will get all actors in sync again and should allow for proper authentication.

Let us know if you continue to encounter issues. Thank you @brian159james for your insight and for the collaboration on this issue! :folded_hands:

Have a great one,
Gerald