Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4791 pages

Help for owners

Azure started requiring MFA and the scripts my business relies on can no longer change anything

Short answer

Microsoft now requires multifactor sign-in for Azure. Since 1 October 2025 it has been rolling this out to Azure CLI, PowerShell, infrastructure tools, the REST API and SDKs for every create, update or delete; reading is not affected. A script signed in as a person cannot answer an MFA prompt, so it fails. The fix is a managed identity or service principal, which the rule does not cover.

  • Written for business owners
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Does this sound like your situation?

  • A scheduled Azure job now fails with AADSTS50076 or a message that interactive authentication is needed.
  • The script still lists and reads resources, then fails as soon as it creates, changes or deletes one.
  • Deployments from a pipeline or an infrastructure tool stopped, while staff with MFA can still work in the Azure portal.
  • The automation signs in with a shared user name and password, such as a service or admin account.
  • Microsoft sent emails about mandatory MFA to my Global Administrator, and nobody followed them up.

Why does this happen?

  1. Phase 1 put MFA on the portals

    From October 2024, Microsoft started requiring MFA for anyone who signs in to the Azure portal, the Microsoft Entra admin center or the Microsoft Intune admin center, for any create, read, update or delete. The Microsoft 365 admin center followed from February 2025. Phase 1 did not touch Azure CLI, PowerShell, the mobile app or infrastructure-as-code tools.

  2. Phase 2 reached the tools that scripts use

    Starting 1 October 2025, Microsoft began enforcing MFA gradually across tenants for Azure CLI, Azure PowerShell, the Azure mobile app, infrastructure-as-code tools, the REST API and the Azure SDK, for create, update and delete only. The check sits on the Azure Resource Manager side, so any request to management.azure.com is covered, while Microsoft Graph calls generally are not.

  3. Why reads still work and changes fail

    Microsoft states that read operations do not require MFA. A user who signed in without MFA can still use these tools, but a create, update or delete returns an error that asks for MFA together with a claims challenge. Some tools turn that into a prompt; others only show the error, which is all an unattended script ever sees.

  4. Signing in with only a user name and password cannot pass MFA

    Microsoft calls this flow ROPC and says it is incompatible with MFA: az login with a user name and password fails with AADSTS50076. Microsoft adds that service accounts synced from an on-premises Active Directory hit the same MFA requirement as any other user.

  5. Identities made for software are outside the rule

    Microsoft says workload identities, meaning managed identities and service principals, are not affected by either phase. It also says user identities are not recommended for automation and should be migrated to workload identities.

What can I do about it today?

  1. Find out which account each failing job signs in withAsk whoever set up the script or pipeline for the user name it uses, and whether it belongs to a person or is shared. Write the answer next to the job name.
  2. Have an admin read the sign-in logsMicrosoft says the Entra ID sign-in logs show which application required MFA. Failed sign-ins for that account from Azure CLI or Azure PowerShell point to this change rather than a wrong password.
  3. Confirm that Phase 2 is live for your tenantA Global Administrator signs in to the Azure portal and opens aka.ms/postponePhase2MFA. Microsoft says a banner on that page confirms when enforcement has begun. Only read the banner; leave the date and settings on that page as they are.
  4. Do not weaken sign-in to get the script runningMicrosoft says there is no opt-out, and exclusions in a Conditional Access policy no longer exempt anyone. Sharing a phone or a code with the script's account does not help either, because the script cannot answer the prompt.
  5. Make urgent changes by hand meanwhileA person with their own MFA can still carry out a change that cannot wait, in the portal or from the command line, while the automation is being moved.
  6. Ask everyone to update their Azure toolsFor the best compatibility, Microsoft asks for Azure CLI 2.76 and Azure PowerShell 14.3 or later. Microsoft says older versions can show error messages instead.

When should I bring someone in?

  • Nobody knows which accounts your scripts and pipelines use, or the person who built them has left.
  • Some automation runs outside Azure, for example in GitHub Actions or another cloud, and needs an identity Azure can trust.
  • A deployment stopped halfway and left resources partly created or changed.

How do I handle it?

  1. Map every job to its sign-inI list the scripts, scheduled tasks, pipelines and tools that touch Azure, and match each one to the account it uses, using the sign-in logs and the app IDs Microsoft publishes for Azure CLI and PowerShell.
  2. Choose the right identity for each jobMicrosoft describes managed identities as more secure but less flexible and service principals as more flexible but less secure. I use a managed identity when the job runs on an Azure resource, a service principal when it must reach several subscriptions, and a federated identity for GitHub Actions, Kubernetes or another cloud.
  3. Give the new identity only what the job needsRoles are assigned on the resource groups or resources the job actually changes, not across the whole subscription.
  4. Switch one job at a time and test itI change the sign-in line, including code that passes AZURE_USERNAME and AZURE_PASSWORD to DefaultAzureCredential, which Microsoft says must change. I run a read and then a harmless write in a test setting, and only then move the production job. A backup and a way back exist before production changes.
  5. Retire the old shared accountIts password comes out of scripts and settings, its access is watched for anything still using it, and only then is it disabled. Emergency admin accounts move to a passkey or a certificate, which Microsoft says meet the requirement.

The price depends on what I find, so I quote in writing after a short discovery call. Tell me what is happening and I reply within 24 hours.

What do owners ask about this?

Can I still postpone this?

No longer by choosing a date. Microsoft let tenants push Phase 1 back until 30 September 2025 and Phase 2 until 1 July 2026, and both dates have passed. Once Phase 2 enforcement has begun, a Global Administrator can ask Microsoft Help and Support to lift it temporarily. Microsoft says there is no way to opt out.

Do my customers now need MFA for my website or app on Azure?

No. Microsoft says users do not need MFA to reach other applications, websites or services hosted on Azure; the owner of each one decides how its users sign in. The rule covers people who manage Azure.

Does a managed identity cost extra?

Microsoft states that you do not incur extra costs for using managed identities. The identity's credentials are handled by Azure, so there is no password or secret for your team to store.

Is the emergency admin account exempt?

No. Microsoft says break-glass accounts must sign in with MFA once enforcement begins, and recommends a passkey (FIDO2) or certificate-based authentication for them.

Why did nobody warn me?

Ahead of Phase 2, Microsoft says it sent notices to every Microsoft Entra Global Administrator by email and through Azure Service Health. If that role sits with a former contractor or an unread mailbox, the warning was missed.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Found a mistake? Tell me.

For your developer: the technical fixes

Related help

Next step

Want this off your desk?

Send me a few lines on where things stand. I reply within 24 hours.