Skip to main content
Microsoft 365intermediate

AADSTS50076: Multifactor Authentication Required — How to Fix

Fix AADSTS50076 — due to a configuration change made by your administrator, you must use MFA. Why it appears in PowerShell and legacy apps, and the real fix.

9 min readUpdated August 2026

AADSTS50076 — "Due to a configuration change made by your administrator, you must use multi-factor authentication to access this resource" means your password was accepted and a second factor is required that the app could not collect. This guide covers the interactive fix, the PowerShell and script versions of the problem, and why an MFA exclusion is the wrong answer.

The Error

AADSTS50076: Due to a configuration change made by your administrator,
or because you moved to a new location, you must use multi-factor
authentication to access '<resource>'.

Microsoft's internal name for the code is UserStrongAuthClientAuthNRequired, and the documented cause reads: due to a configuration change made by the admin such as a Conditional Access policy, per-user enforcement, or because you moved to a new location, the user must use multifactor authentication to access the resource.

Your password is not wrong. This error arrives after the password succeeded. The sign-in is incomplete, not rejected.

Why This Happens

Entra ID checks credentials in stages. Password first, then any additional factors a policy requires. AADSTS50076 is the second stage failing — not because you got the code wrong, but usually because the app you are using had no way to ask you for it.

The three documented triggers:

  1. A Conditional Access policy now requires MFA for that user, app, or condition
  2. Per-user MFA enforcement was switched on for the account
  3. A new location — signing in from a network or country that a policy treats differently

The pattern that generates most of these tickets: something worked for years, an administrator enabled MFA, and every non-interactive sign-in broke at once.

Fix 1: Complete the MFA Prompt (Interactive Sign-In)

If you are in a browser or a modern app, this is the whole fix.

  1. Sign in as normal.
  2. When the verification prompt appears, approve the notification in Microsoft Authenticator or enter the code.
  3. If you are asked to trust the device or stay signed in, doing so reduces how often you are challenged.

If no prompt ever appears, the app cannot display one — go to the next section.

If you have never set up MFA, you will see AADSTS50079 instead, or hit a registration wall. Go to aka.ms/mfasetup and register a method first. Until an account has a second factor registered, no app can get past this.

Fix 2: PowerShell and Scripts

This is where AADSTS50076 gets confusing, because the error looks like an account problem and is actually a connection method problem.

The cause: any sign-in that passes a stored username and password has no channel for a verification challenge. Entra ID requires a second factor, the method cannot supply one, and you get AADSTS50076. The same account signs in fine in a browser thirty seconds later, which is what makes it look like a bug.

For interactive admin work, use a connection that opens a real sign-in window:

Connect-ExchangeOnline -UserPrincipalName admin@yourdomain.com

A browser prompt appears, you complete MFA, and the session connects. What does not work is passing a credential object:

# Fails with AADSTS50076 once MFA is enforced
$cred = Get-Credential
Connect-ExchangeOnline -Credential $cred

The -Credential parameter is only viable for accounts without MFA. Full setup details are in how to install and connect to Exchange Online PowerShell.

On a machine with no browser, PowerShell 7 can authenticate via a second device:

Connect-ExchangeOnline -Device

It prints a code to enter at microsoft.com/devicelogin on your phone, and completes once you have.

Fix 3: Unattended Scripts — Use App-Only Authentication

For scheduled tasks, runbooks, and CI pipelines, there is no interactive prompt to complete, ever. Do not try to make MFA work unattended. Move to app-only authentication.

Certificate-based:

Connect-ExchangeOnline `
    -CertificateThumbPrint "ABCD1234567890ABCD1234567890ABCD12345678" `
    -AppId "12345678-1234-1234-1234-123456789012" `
    -Organization "yourdomain.onmicrosoft.com"

Setup, in order:

  1. Register an application in Microsoft Entra ID
  2. Upload a certificate's public key to the app registration
  3. Install the private key on the machine that runs the script
  4. Grant the app the Exchange.ManageAsApp API permission and consent to it
  5. Assign the app an Exchange admin role

On Azure resources, a managed identity removes the certificate entirely:

Connect-ExchangeOnline -ManagedIdentity -Organization "yourdomain.onmicrosoft.com"

Both approaches are more secure than the stored password they replace, because there is no reusable secret sitting in a script for someone to find.

Advertisement

Fix 4: Retire Legacy Clients

An old mail client that only speaks basic authentication cannot carry an MFA challenge, and Microsoft has retired basic authentication across Microsoft 365. There is no setting that brings it back.

The fix is the client, not the configuration: move to Outlook, or to the mail app built into a current mobile OS. If a line-of-business application authenticates with a stored mailbox password, it needs to move to modern authentication or app-only access — that is a vendor conversation, and one worth starting before the tickets arrive.

Admin Side: Should You Change Anything?

Usually not. AADSTS50076 normally means MFA is working as designed and someone is using a method that predates it.

Investigate the policy only when the requirement itself looks wrong — MFA being demanded for a scenario it should not apply to, or every user in a location being challenged unexpectedly.

To see what applied: Microsoft Entra admin center → MonitoringSign-in logs, filter to the user and time, open the failed entry, and read the Conditional Access tab. It lists every policy evaluated and which one required MFA. That beats guessing from policy names.

On excluding the account: don't, in almost every case. An MFA exclusion leaves a password-only account, which is precisely the target credential-stuffing attacks look for, and exclusions are rarely reviewed once they exist. For automation, app-only authentication is both safer and more reliable. Reserve exclusions for documented break-glass accounts with stored, monitored credentials.

Requires: Conditional Access Administrator or Global Administrator to change Conditional Access; Authentication Policy Administrator or Global Administrator for per-user MFA settings; an administrator who can register applications and grant consent to set up app-only authentication.

Verify the Fix

  1. Interactive: sign out completely, sign back in from a private browser window, and confirm the MFA prompt appears and completes.
  2. PowerShell: after connecting, run Get-ConnectionInformation — it returns the connection state and tenant, confirming a real session rather than a silent failure.
  3. App-only: run the script under its scheduled task or service account, not just from your own console. A certificate installed in your user store is invisible to the service account that will actually run it — a classic reason "it works on my machine" and fails at 2am.
  4. Check the sign-in logs for a success entry against the account, which is the authoritative confirmation.

Prevent It Coming Back

  • Inventory non-interactive sign-ins before enforcing MFA. Sign-in logs filtered to legacy authentication show you what is about to break, while you still have the option of scheduling it.
  • Move automation to app-only authentication first, then enforce MFA on user accounts. Doing it the other way round means an outage.
  • Track certificate expiry. App-only authentication fails silently and completely when the certificate lapses, and the resulting error will not mention certificates.
  • Register a second MFA method per user. A single method on a lost phone becomes a helpdesk ticket and, briefly, a locked-out user.
  • Announce enforcement changes. Most AADSTS50076 tickets are people meeting a new requirement with no warning.
CodeMeaningDifferent because
AADSTS50079MFA required but the user has registered no security infoNothing exists to challenge with — register at aka.ms/mfasetup first
AADSTS50158An external security challenge was not satisfiedTerms of use or a third-party MFA provider, not Entra MFA itself
AADSTS53003Access blocked by Conditional AccessBlocked outright rather than asked for another factor
AADSTS50105The user isn't assigned to a role for the applicationAuthorization failure, not authentication

Frequently Asked Questions

Find answers to common questions

It means Entra ID accepted your password and then required a second factor that the app could not collect. Microsoft's internal name is UserStrongAuthClientAuthNRequired, and the documented causes are a configuration change by an administrator such as a Conditional Access policy, per-user MFA enforcement, or the user signing in from a new location. Your password is correct — the sign-in simply is not finished.

Because the browser can show an interactive MFA prompt and the connection method you used cannot. Anything passing a stored username and password — a credential object, an old script, a legacy client — has no way to present a verification challenge, so Entra ID rejects the attempt with AADSTS50076. Switching to an interactive sign-in that opens a browser window resolves it immediately.

Complete an interactive sign-in so you can answer the MFA prompt. In a browser, sign in normally and approve the notification or enter the code. In PowerShell, use a connection method that opens a sign-in window rather than one that passes a stored credential. If you have never registered a second factor, go to aka.ms/mfasetup first — until you do, no app will let you through.

AADSTS50076 means MFA is required and you have it set up but have not completed it for this sign-in. AADSTS50079 means MFA is required and you have not registered any security information yet, so there is nothing to challenge you with. The first is fixed by completing the prompt, the second by registering a method at aka.ms/mfasetup.

Something changed on the tenant side. The documented triggers are an administrator enabling or modifying a Conditional Access policy, per-user MFA enforcement being switched on, or you signing in from a new location that a policy treats differently. Scripts and service accounts that ran unattended for years break the day MFA is enforced, which is the most common version of this.

Do not try to make MFA work unattended — move the script to app-only authentication instead. Register an Entra ID application, give it a certificate, grant it the API permission and admin role it needs, and connect with the certificate rather than a username and password. On Azure resources, a managed identity does the same job without a certificate to rotate.

You can, and it is almost always the wrong answer. An exclusion leaves a password-only account, which is exactly what credential-stuffing attacks look for, and exclusions are rarely reviewed once created. For automation, certificate or managed-identity authentication is both more secure and more reliable than an MFA exclusion. Reserve exclusions for documented break-glass accounts.

No. The error is raised after your password has already been accepted. Entra ID separates the password check from the second-factor check, and this code is the second one failing. Resetting your password will not help and may cost you time — the sign-in got further than most people assume.

Because it uses basic authentication, which cannot carry an MFA challenge. Microsoft has retired basic authentication across Microsoft 365, so there is no configuration that makes the old client work again. Move to a client that supports modern authentication — Outlook, or the built-in mail app on a current mobile OS.

Most of the time nobody needs to — you complete the MFA prompt and it works. If MFA enforcement itself is misconfigured, changing Conditional Access needs a Conditional Access Administrator or Global Administrator, and per-user MFA settings need an Authentication Policy Administrator or Global Administrator. Setting up app-only authentication for scripts needs an administrator who can register applications and grant consent.