How to fix 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

Francescopio Pascale 95 Reputation points
2023-05-20T14:30:45.38+00:00

hello I am trying to make a request to obtain the token "https://login.microsoftonline.com/organizations/oauth2/v2.0/token" where I have set all the various fields in the body, such as client_id, scope, username, password, client_secret and grant_type = password. However, I get this 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", I tried to remove multi-factor authentication in Azure, but I noticed that it's not actually enabled, so it's like it's set by default, how can I fix it?

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
24,415 questions
{count} votes

8 answers

Sort by: Most helpful
  1. Dillon Silzer 57,716 Reputation points
    2023-05-20T15:58:31.6933333+00:00

    Hello Francescopio,

    I'd recommend checking three things:

    1. Check if security defaults are turned on (which enforces MFA).
    2. Check whether you have a sign-in risk on your account. If there is a sign-in risk policy that enforces MFA, then this could be your issue.
    3. Check for Conditional Access Policies that enforce MFA on your account.

    You could also take a deeper look into your sign-in logs in Azure active Directory to get more details on the message.

    Hopefully this helps.


    If this is helpful please accept answer.

    2 people found this answer helpful.

  2. Infinity Solutions Arizona 5 Reputation points
    2023-10-19T04:42:33.83+00:00

    Just ran into this issue today. It had to do with entrada MFA enforcement. Go to your entrada MFA security management and disable the enforcement policies for the account used for the AAD sync. I still have legacy MFA enabled no problem and didnt drill down yet to see exactly which policy killed it but that should get anyone experiencing the issue headed in the right direction. I'll post more as I play with it more later (it's late here!).

    1 person found this answer helpful.
    0 comments No comments

  3. Karl Wester-Ebbinghaus 41 Reputation points MVP
    2023-07-08T20:16:59.7833333+00:00

    Dear @Dillon Silzer I wanted to onboard WAC. Seeing the same error. Some workflows don't work anymore with MFA accounts
    Described a workaround for the issue:
    https://techcommunity.microsoft.com/t5/windows-admin-center-blog/windows-admin-center-version-2306-is-now-generally-available/bc-p/3869089/highlight/true#M496

    0 comments No comments

  4. Niels de Jager 0 Reputation points
    2024-01-24T14:12:11.5933333+00:00

    Not sure if this helps anyone since it's an old post. But this seems to be happening if you have an conditional access policy that requires MFA. But also have a IP exclusion that does not require MFA..


  5. Harshvir Bhati 26 Reputation points
    2024-03-14T15:25:34.7433333+00:00

    Hello,

    I just had the issue and I was able to resolve it after the az login command on PowerShell, then I ran the az get access token.

    I hope this helps.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.