registration in authenticator app fails following example in https://learn.microsoft.com/en-us/training/modules/secure-aspnet-core-identity/7-configure-multi-factor-authentication

Christof Sidler 20 Reputation points
2024-05-28T20:47:24.3+00:00

I followed the description in https://learn.microsoft.com/en-us/training/modules/secure-aspnet-core-identity/7-configure-multi-factor-authentication
the code generated in the microsoft authenticator app is rejected with message "Verification code is invalid"

This question is related to the following Learning Module

ASP.NET Core Training
ASP.NET Core Training
ASP.NET Core: A set of technologies in the .NET Framework for building web applications and XML web services.Training: Instruction to develop new skills.
13 questions
{count} votes

Accepted answer
  1. Pradeep M 1,055 Reputation points Microsoft Vendor
    2024-05-29T02:37:16.2933333+00:00

    Hi Christof Sidler

    Thank you for reaching out to Microsoft Q & A forum. 

    Despite your thorough adherence to the instructions for setting up multi-factor authentication with the Microsoft Authenticator app, encountering the "Verification code is invalid" error can understandably lead to frustration. To effectively resolve this issue, let's move forward by applying the following troubleshooting measures: 

    1.Confirm Authenticator Setup: To begin, it's essential to ensure that the Microsoft Authenticator app is set up correctly. Take a moment to double-check that you've scanned the QR code from the application accurately and added the account without any hitches. 

    2.Ensure Time Synchronization: Ensuring that the time settings on both the server and the device running the authenticator app are synchronized is crucial. Even a minor discrepancy in time can disrupt the verification process, so verify that both devices' time settings align. 

    3.Exercise Care with Verification Code Entry: When entering the verification code from the Microsoft Authenticator app, exercise caution to avoid any mistakes. Even the smallest error, such as a typo or an additional space, can trigger the "Verification code is invalid" message. 

    4.Consider Retrying the Verification Process: If you've entered the verification code correctly and still encounter the error, consider generating a new verification code and attempting the verification process again. Sometimes, a transient glitch may cause the code to become invalid temporarily. 

    5.Validate Authenticator Configuration: Take a moment to ensure that the account is correctly configured within the Microsoft Authenticator app. Confirm that the account name and key are displayed accurately, matching the details provided during the initial setup. 

    6.Review Application Logs for Insights: If the issue persists despite these efforts, it may be beneficial to review the application logs. Look for any error messages or exceptions that could provide insights into the root cause of the "Verification code is invalid" error. Application logging often reveals underlying issues that may not be immediately apparent. 

    Please feel free to contact us if you have any additional questions. 

    If you have found the answer provided to be helpful, please click on the "Accept answer/Upvote" button so that it is useful for other members in the Microsoft Q&A community.    

    Thank you. 

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful