Every time a user authenticates, a verification code is requested.

Jaime Vasquez 6 Reputation points
2022-08-17T00:18:28.737+00:00

Hi All

I have a custom mvc app and have successfully implemented Azure Active Directory.

I've created users who log in with an external email address (gmail.com); these users can log in with only their username and password.

But now I'm having trouble with new users because they are always required to enter a code that is sent to the configured email address.

I've turned off Security Defaults and Per-user MFA, but the code is still required with every login.

How do I turn off this feature?
Users must only enter their username and password, with no need to enter a code.

I'd like to point out that the users affected are those who were created after the user count surpassed 100.

Another thing to note is that users who have errors are assigned the identity 'mail,' whereas users who work normally are listed as 'MicrosoftAccount' in Identities. Attached is an example.

5KGFNcH

Thank you

Jaime Vasquez

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,782 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Jaime Vasquez 6 Reputation points
    2022-08-17T03:18:32.96+00:00

    This behavior occurs because "Email one-time passcode" is enabled by default in Azure

    To resolve it, go to "Azure Active Directory" => "External Identities" => "All Identity Providers"

    Look for "Email one-time passcode", Edit and select "Disable email one time passcode for guests"

    https://learn.microsoft.com/en-us/azure/active-directory/external-identities/one-time-passcode

    Thank you

    Jaime Vasquez.

    1 person found this answer helpful.

  2. JamesTran-MSFT 36,476 Reputation points Microsoft Employee
    2022-08-17T23:00:03.707+00:00

    @Jaime Vasquez
    I'm glad that you were able to resolve your issue and thank you for posting the solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others", I'll repost your solution in case you'd like to "Accept" the answer.

    Issue:

    Every time a user authenticates, a verification code is requested.

    Solution:

    This behavior occurs because "Email one-time passcode" is enabled by default in Azure

    To resolve it, go to "Azure Active Directory" => "External Identities" => "All Identity Providers"

    Look for "Email one-time passcode", Edit and select "Disable email one time passcode for guests"

    232175-image.png

    If you have any other questions, please let me know.
    Thank you again for your time and patience throughout this issue.


    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

    0 comments No comments