Security & identity

AADSTS50076, 50079 and 50158: fix Microsoft Entra MFA sign-in errors

What AADSTS50076, AADSTS50079 and AADSTS50158 mean, how to find the policy that demanded MFA in the Entra sign-in logs, and how to fix each one for users, scripts and federated domains.

12 min read
On this page

AADSTS50076 means Microsoft Entra ID needs multifactor authentication for this resource and the request didn't include it, so the client must start a new interactive sign-in. AADSTS50079 means MFA is required but the user has no usable method registered (or, for federated users, the identity provider didn't send an MFA claim). AADSTS50158 means the user was sent to an external challenge such as terms of use or a third-party MFA provider; it isn't a failure on its own.

Who this is for and what you will have at the end

This guide is for administrators and help desk staff who see these codes in error pages, scripts or the Microsoft Entra sign-in logs, typically after a Conditional Access rollout, a new device, or a change in authentication methods. It's also for engineers whose automation started failing with AADSTS50076.

At the end you will have:

  • A precise meaning for each code and the related codes that usually appear alongside them.
  • A repeatable way to find the sign-in event, the authentication step that failed, and the source of the MFA requirement.
  • Fixes for each code, covering users without methods, non-interactive scripts and federated domains.
  • A Log Analytics query for spotting patterns across many users.

What each code means

The definitions below come from the Microsoft Entra error code reference.

CodeNameMeaningWho acts
AADSTS50076UserStrongAuthClientAuthNRequiredBecause of a configuration change such as a Conditional Access policy, per-user enforcement, or a move to a new location, the user must use MFA to access the resource. Retry with a new authorize request.Client app or user
AADSTS50079UserStrongAuthEnrollmentRequiredMFA is required. Either a managed user needs to register security info, or a federated user needs to get the MFA claim from the federated identity provider.User, admin, or federation admin
AADSTS50158External security challenge not satisfiedThe user was redirected to another page or provider, such as terms of use or a third-party MFA provider, to satisfy extra requirements. On its own it doesn't indicate a failure.Usually nobody; check the next event

Related codes often appear in the same investigation:

CodeMeaning
AADSTS50072User needs to enroll for second factor authentication (interactive)
AADSTS50074Strong authentication is required and the user didn't pass the MFA challenge
500121User didn't complete the MFA prompt; often seen when MFA setup wasn't finished
AADSTS53004ProofUpBlockedDueToRisk: the user needs to complete MFA registration before accessing the content
AADSTS530035Access blocked by security defaults

The practical distinction: 50076 is "MFA wasn't performed", 50079 is "MFA can't be performed yet", and 50158 is "MFA or another challenge was handed to something outside Entra ID".

Prerequisites

  • At least the Reports Reader role to read sign-in logs. To see which Conditional Access policies applied, you need a role that can read Conditional Access data, such as Global Reader, Security Reader, Security Administrator or Conditional Access Administrator.
  • Authentication Administrator to issue a Temporary Access Pass to users, or Privileged Authentication Administrator for administrators.
  • Authentication Administrator to require a user to re-register for MFA; Authentication Policy Administrator to change authentication method policies.
  • Optional: sign-in logs sent to a Log Analytics workspace for the query in Step 3.

Step 1: Find the sign-in event

Ask the user for the time of the failure and, if possible, the correlation ID from the error page's More details link.

  1. Sign in to the Microsoft Entra admin center as at least a Reports Reader.
  2. Browse to Entra ID > Monitoring & health > Sign-in logs.
  3. Filter by Username, Date and, if you have it, Correlation ID. Set Status to Failure if you want only failed events.
  4. Check both User sign-ins (interactive) and User sign-ins (non-interactive). A 50076 from a background token refresh lands in the non-interactive tab.
  5. Open the event and record the Correlation ID, Sign-in error code, Failure reason and Additional Details.

The Additional Details field often names the fix. For example, the failure reason "Authentication failed during the strong authentication request" comes with additional details stating that the user didn't complete the MFA prompt.

Step 2: Work out why MFA was required

Open these tabs in the sign-in event:

  • Authentication Details lists the authentication policies applied, such as Conditional Access or security defaults, the sequence of methods attempted, and whether each step succeeded and why. It's the fastest way to see whether the user was prompted at all.
  • Conditional Access lists every policy evaluated with its result. Select the ellipsis next to a policy to see which sign-in details matched its conditions.
  • Basic info includes Troubleshoot Event, which opens the sign-in diagnostic.

If the requirement didn't come from Conditional Access, it came from per-user MFA, ID Protection or security defaults. The AuthenticationRequirementPolicies field in Log Analytics records which of those sources applied.

A sudden spike across many users almost always follows a change. Check Entra ID > Monitoring & health > Audit logs with the Service filter set to Conditional Access for Update Conditional Access policy, Add Conditional Access policy and Update security defaults around the time failures began.

Step 3: Query the pattern in Log Analytics

Interactive sign-ins are in the SigninLogs table, where ResultType holds the error code as a string. This query shows who is hitting each code, from which app and protocol, and what demanded MFA:

SigninLogs
| where TimeGenerated > ago(7d)
| where ResultType in ("50076", "50079", "50158")
| summarize Events = count(), LastSeen = max(TimeGenerated)
    by UserPrincipalName, AppDisplayName, ResultType, AuthenticationProtocol, ClientAppUsed, AuthenticationRequirementPolicies
| order by Events desc

Read the results this way:

  • AuthenticationProtocol of ropc means something is sending a username and password directly. It can't show an MFA prompt, so it fails with 50076 every time MFA is required.
  • A ClientAppUsed value for a legacy protocol points at an old client or script.
  • The same user with 50079 across many apps means they have no registered method.

To follow a 50158 through to its outcome, query by correlation ID:

SigninLogs
| where CorrelationId == "<correlation-id>"
| project TimeGenerated, ResultType, ResultDescription, AuthenticationRequirement, ConditionalAccessStatus
| order by TimeGenerated asc

Fix AADSTS50076

Interactive users. Have the user sign in again through a browser or an app that supports modern authentication and can show the MFA prompt. If the user is stuck in a loop, check the Authentication Details tab: the issue may be a method that fails (an Authenticator notification that never arrives) rather than missing MFA.

Location-triggered prompts. The error text mentions moving to a new location. A user who signs in from a different network can fall into the scope of a policy that doesn't apply on the usual network, such as one that excludes a trusted named location. That's working as designed; the user completes MFA.

Scripts and legacy clients. Anything that passes a stored username and password can't satisfy MFA. Options, in order of preference:

  1. For unattended automation, move to app-only authentication: a service principal with a certificate, or a managed identity for workloads running in Azure. Service principal and managed identity sign-ins appear in their own sign-in log tabs.
  2. For administrator scripts run by a person, switch to the module's interactive or device-based sign-in so MFA can be prompted. Note that device code flow is a common target of Conditional Access block policies.
  3. Replace legacy protocol clients with ones that support modern authentication.

Don't fix 50076 by excluding the account from MFA. An exclusion leaves a password-only account that is easy to abuse and rarely reviewed again.

Fix AADSTS50079

Managed users with no method. The user registers at Security info, https://aka.ms/mysecurityinfo (or https://mysignins.microsoft.com/security-info). Check which methods are enabled for them under Entra ID > Authentication methods > Policies; if the method they try to add isn't enabled, they can't register it.

Users who can't complete the first registration, for example because they lost their phone, need a Temporary Access Pass:

  1. Enable Temporary Access Pass under Entra ID > Authentication methods > Policies and include the user. This needs Authentication Policy Administrator.
  2. As at least an Authentication Administrator, go to Entra ID > Users, select the user, then Authentication methods > Add authentication method > Temporary Access Pass.
  3. Give the pass to the user. It can't be viewed again after you close the dialog.
  4. The user signs in at Security info with the pass and registers a method.

The default TAP lifetime is one hour, configurable from 10 minutes to 30 days, with a default length of eight characters. The same step can be done with Microsoft Graph PowerShell:

Connect-MgGraph -Scopes "UserAuthenticationMethod.ReadWrite.All"
 
$properties = @{ isUsableOnce = $true }
New-MgUserAuthenticationTemporaryAccessPassMethod -UserId "user@contoso.com" -BodyParameter $properties

Stale or broken methods. If the registered method no longer works, an Authentication Administrator can open the user under Entra ID > Users, select Authentication methods > Require re-register MFA, and confirm. This deletes the user's phone numbers, Microsoft Authenticator registrations and software OATH tokens, and the user is asked to set up a new method at the next sign-in.

Federated users. For a federated domain, the second half of the 50079 definition applies: the user needs an MFA claim from the federated identity provider. The domain's federatedIdpMfaBehavior setting controls this:

ValueBehavior
acceptIfMfaDoneByFederatedIdpEntra ID accepts MFA from the IdP; if the IdP didn't perform it, Entra ID performs MFA
enforceMfaByFederatedIdpEntra ID accepts MFA from the IdP; if it wasn't performed, the request is redirected to the IdP to perform it
rejectMfaByFederatedIdpEntra ID always performs MFA and rejects MFA from the IdP

If neither federatedIdpMfaBehavior nor the older SupportsMfa is set, the default is acceptIfMfaDoneByFederatedIdp. Check the current value:

Connect-MgGraph -Scopes "Domain-InternalFederation.Read.All"
Get-MgDomainFederationConfiguration -DomainId "contoso.com" |
    Select-Object FederatedIdpMfaBehavior, PreferredAuthenticationProtocol

With enforceMfaByFederatedIdp, 50079 points at the IdP's MFA configuration, not at the user's Entra methods. A Temporary Access Pass is evaluated in Entra ID without redirecting to the federated IdP, which makes it useful for recovery.

Fix AADSTS50158

Start by checking the next events with the same correlation ID. If a later event succeeded, the user completed the external challenge and there is nothing to fix.

When it doesn't succeed, identify the external step:

  • Terms of use. A Conditional Access policy requires acceptance of a terms of use document. The user must accept it.
  • Conditional Access custom controls. The policy redirects to a third-party provider. Check the provider's own logs.
  • External authentication methods (external MFA). The provider is registered under Entra ID > Authentication methods. If the provider's application has been deleted or no longer has permission, sign-in fails and the method can't be used. Granting admin consent for the provider app requires at least Privileged Role Administrator.

If a user is in scope of both a custom control policy and an external MFA policy, they're redirected to the provider twice. Microsoft recommends separate test groups for each during migration.

Verify the fix

  1. Have the user sign in again and confirm a Success event in the sign-in logs.
  2. In Authentication Details, confirm the MFA step shows the expected method and a success result.
  3. In the Conditional Access tab, confirm the MFA policy shows Success.
  4. For scripts moved to app-only, confirm sign-ins appear under Service principal sign-ins or Managed identity sign-ins, not as user sign-ins.
  5. Re-run the Step 3 query a day later; the user, app or protocol should no longer appear.

Troubleshooting quick reference

SymptomLikely causeFix
50076 on every run of a scheduled jobScript uses a stored password (ROPC)Move to certificate-based app-only auth or managed identity
50076 spike across many usersNew or changed MFA policy, or security defaults turned onReview audit log changes; communicate or adjust scope
50079 for a new hireNo method registered yetTemporary Access Pass, then register at Security info
50079 for federated users onlyIdP not sending the MFA claim with enforceMfaByFederatedIdpFix MFA on the IdP or change federatedIdpMfaBehavior
500121 after 50076User didn't finish the MFA promptRetry; check the method in Authentication Details
50158 followed by failureExternal provider or terms of use not completedCheck the provider; confirm its app consent
User can't add a method at Security infoMethod not enabled, or maximum number reachedEnable the method; wait for policy propagation and retry

When the error is AADSTS53003 rather than an MFA code, the policy is blocking rather than challenging; see AADSTS53003 blocked by Conditional Access.

Checklist

  • Sign-in event found in the right tab, with correlation ID, error code and additional details recorded.
  • Source of the MFA requirement identified: Conditional Access, per-user MFA, ID Protection or security defaults.
  • 50076: interactive retry for users; app-only auth for automation; no MFA exclusions.
  • 50079: method registered at Security info, Temporary Access Pass for bootstrap, re-registration if methods are stale, federation MFA behavior checked.
  • 50158: follow-up events checked; external provider or terms of use investigated only if they failed.
  • Fix verified in sign-in logs and the Log Analytics query.

References

Questions people ask

What does AADSTS50076 mean?

AADSTS50076 (UserStrongAuthClientAuthNRequired) means multifactor authentication is required for the resource, because of a Conditional Access policy, per-user MFA, or a location change, and the request didn't include it. The client must retry with a new interactive authorize request so the user can complete MFA.

How do I fix AADSTS50079?

AADSTS50079 means the user must use MFA but has no usable method registered. A managed user fixes it by registering security info at https://aka.ms/mysecurityinfo; an administrator can issue a Temporary Access Pass if the user can't complete the first sign-in. For federated users, the federated identity provider must supply the MFA claim.

Is AADSTS50158 a sign-in failure?

Not necessarily. AADSTS50158 means the user was redirected to satisfy an external challenge, such as terms of use or a third-party MFA provider. Check the following sign-in events with the same correlation ID to see whether the challenge was passed or failed.

Should I exclude a service account from MFA to stop AADSTS50076?

No. An exclusion leaves a password-only account exposed. Move unattended automation to app-only authentication with a certificate or a managed identity instead of signing in as a user with a stored password.

Microsoft Entra IDMFASign-in logsConditional Access
  1. AADSTS53003 blocked by Conditional Access: find the policy and fix it

    Troubleshoot AADSTS53003 in Microsoft Entra ID: trace the correlation ID to the sign-in log, identify the blocking Conditional Access policy, and fix the user, device or policy without weakening security.

  2. Conditional Access All resources exclusions: test the 2026 change

    Since June 2026, Conditional Access enforces All resources policies with exclusions on sign-ins that request only baseline scopes. Find the affected apps, test them and choose an enforcement setting.

  3. Plan a Microsoft 365 MFA rollout with Conditional Access and Authenticator

    A phased plan to require MFA for every Microsoft 365 user: pick security defaults or Conditional Access, set authentication methods, drive registration, pilot in report-only mode, then enforce.