Unable to Log in to Azure Account Due to MFA Issues – Need to Reset MFA Without Portal Access

Atul Kamble 1 Reputation point
2025-03-08T09:45:56.84+00:00

I am unable to log in to my Azure account due to MFA verification issues. When entering the code from the Microsoft Authenticator app, I receive an error stating:

"You didn't enter the expected verification code. Please try again."

I tried signing in using the "Sign in another way" option and entering a verification code, but it also failed with the same error.

Since I am unable to access the Azure Portal, how can I remove or reset my MFA settings using the Azure Mobile App or Azure CLI, which are still working?Screenshot 2025-03-08 at 2.59.49 PM

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
24,322 questions
{count} vote

2 answers

Sort by: Most helpful
  1. Marcin Policht 44,755 Reputation points MVP
    2025-03-08T13:06:01.0033333+00:00

    Try PowerShell

    https://learn.microsoft.com/en-us/answers/questions/827895/please-suggest-a-command-to-reset-mfa


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    0 comments No comments

  2. Raja Pothuraju 21,300 Reputation points Microsoft External Staff
    2025-03-10T19:16:27.53+00:00

    Hello @Atul Kamble,

    Based on your description, I see you are unable to login into Azure Portal due to an incomplete MFA process and looking to reset your MFA for your user.

    You can try resetting the MFA via PowerShell commands which shared by Marcin Policht. If that didn't work, please try below commands.

    Import-Module Microsoft.Graph.Identity.SignIns
    Connect-MgGraph
    Remove-MgUserAuthenticationPhoneMethod -UserId $userID
    

    https://learn.microsoft.com/en-us/graph/authenticationmethods-get-started?tabs=powershell#step-5-remove-a-phone-number-from-the-user

    Seems like we can't reset MFA from Azure Mobile app.

    In this situation, you need to contact your other Global administrator to reset your MFA registration.

    Please share these steps with another global administrator in the tenant to reset your MFA.

    To manage user settings, complete the following steps:

    1.Sign in to the Microsoft Entra admin center as at least an Authentication Administrator.

    2.Browse to Identity > Users > All users.

    3.Choose the user you wish to perform an action on and select Authentication methods. At the top of the window, then choose “Require re-register MFA” options for the user.

    Screenshot of manage authentication methods from the Microsoft Entra admin center.

    Then you can login back to any office application and register with new MFA auth method.

    If you are the only Global Admin in the tenant, this qualifies as a tenant lockout scenario. To resolve this, we need to engage the Data Protection team via a support ticket to unblock your access.

    To proceed, I will need a few details from you. As this information contains Personally Identifiable Information (PII), please share the following details via private message:

    • Contact phone number (add +Country code)
    • Contact email address
    • Global admin email address (affected account)
    • Country
    • TimeZone

    We can then connect offline to discuss further and assist you in resolving this issue.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.