Report #86223
[bug\_fix] 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 'https://management.core.windows.net/'
For interactive development, run \`az login\` again to trigger an interactive authentication flow that will prompt for MFA, satisfying the Conditional Access policy. For automated scenarios \(CI/CD\), switch from user accounts to Service Principals \(App Registrations\) using client credentials \(client ID \+ secret or certificate\) or preferably use Managed Identity \(if running in Azure\) or Workload Identity Federation \(if running outside Azure, e.g., GitHub Actions with azure/login action using OIDC\) to bypass user-specific Conditional Access MFA requirements.
Journey Context:
Developer is using Azure CLI on their laptop, having logged in yesterday with \`az login\` using their Azure AD user account. They have been running \`az group list\` successfully. Today, after switching from their home WiFi to a coffee shop network \(different IP geolocation\), they run a Terraform plan which uses the AzureRM provider. The provider fails with AADSTS50076 stating MFA is required due to a configuration change or new location. The developer tries running \`az account show\` and sees they are still technically logged in with a valid refresh token. They attempt to run the Terraform command again, thinking it was transient, but it fails with the same error. Searching the error code, they discover this is an Azure AD Conditional Access policy requiring MFA when risk conditions change \(such as IP location changes\) or when the session requires step-up authentication. The developer initially tries to use \`az account clear\` and \`az login\` again, but the second login also fails because the cached token is still being used or the session cookie still indicates low authentication strength. They realize they must perform a full interactive login that explicitly triggers the MFA prompt. By running \`az login\` and selecting their account, the browser flow forces the MFA challenge \(SMS or Authenticator app\). Once completed, the new access token contains the MFA claim \(amr claim with mfa\). The Terraform plan now succeeds because the AzureRM provider uses the refreshed CLI credentials which now satisfy the Conditional Access policy.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T03:19:04.206186+00:00— report_created — created