AADSTS50126 Azure Origin: Platform & cloud OSI layer 7 · Application Last updated 13 Oct 2026

AADSTS50126: Error validating credentials due to invalid username or password

Microsoft Entra ID (Azure AD) rejected the sign-in because the username or password is wrong — or the flow can’t use passwords for that account.

Exact message you may see Error validating credentials due to invalid username or passwordinvalid username or password
Seen on: Azure

Meaning

Besides typos and expired/changed passwords, 50126 appears when using the resource-owner password (ROPC) flow with federated or MFA-enabled accounts, or when signing in with the wrong UPN (alias vs primary).

Common causes

  • Wrong password or username/UPN
  • Password changed and cached credentials are old
  • ROPC/legacy auth used with federated or cloud-only MFA accounts
  • Account synced from on-prem with hash sync issues

⚡ Quick fix

  1. Verify the UPN and reset the password
  2. Use interactive or device-code flow instead of username/password
  3. Check the Entra sign-in logs for the failure detail

Detailed fix by platform

Azure CLI

  1. az login --use-device-code

How to diagnose

  1. Sign-in logs — Entra ID → Sign-in logs → failure reason
  2. UPN — Exact username used
  3. Flow — Password-based app?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

401 — HTTP 401 Unauthorized (HTTP)401454 — 454 4.7.0 Temporary authentication failure (SMTP AUTH backend unavailable) (Email / SMTP)454535 5.7.3 — Microsoft 365: 535 5.7.3 Authentication unsuccessful (SMTP AUTH / client submission blocked) (Email / SMTP)535 5.7.3AADSTS500113 — AADSTS500113: No reply address is registered for the application (Azure)AADSTS500113AADSTS50020 — AADSTS50020: User account from identity provider does not exist in tenant and cannot access the application (Azure)AADSTS50020AADSTS50034 — AADSTS50034: The user account does not exist in the directory (Azure)AADSTS50034AADSTS50053 — AADSTS50053: Your account is locked (Smart Lockout) / sign-in blocked due to suspicious activity (Azure)AADSTS50053AADSTS50055 — AADSTS50055: The password is expired (Azure)AADSTS50055AADSTS501…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.