After login via the CLI to Microsoft Azure I receive the following error.

Failed to authenticate '{'additional_properties': {}, 'id': '/tenants/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', 'tenant_id': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'}' due to error 'Get Token request returned http error: 400 and server response: {"error":"interaction_required","error_description":"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 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'. Trace ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Correlation ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Timestamp: 2019-11-26 12:38:30Z","error_codes":[50076],"timestamp":"2019-11-26 12:38:30Z","trace_id":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","correlation_id":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","error_uri":"https://login.microsoftonline.com/error?code=50076","suberror":"basic_action"}'

Yet I'm still able to fully use Azure without any further issues.

I've checked AAD (Azure Active Directory) and MFA isn't active on our tenant. Also I checked AAD about the possible location change mentioned in the error message, but couldn't find anything.

How do I fix the error / what needs to be configured in AAD?

  • if you login to the portal, does it ask for MFA? – Sam Cogan Nov 28 '19 at 17:05
  • No it doesn‘t ask for MFA. Not at azure-cli browser auth and not on portal.azure.com – Thomas Schwärzl Nov 28 '19 at 18:49
  • it sounds like you account might have access to multiple tenant, one of them might be failing. – Hannel Dec 8 '19 at 0:49

Try logging into the portal manually first, using your default browser, complete the MFA process, keep the browser open, and then run the "az login" from the cli again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.