AADSTS50126: invalid username or password
Entra ID couldn't validate the credentials because the username or password was wrong. Some of these are expected in any tenant's logs.
From Microsoft's documentation, checked 9 Nov 2026.
AADSTS50126: InvalidUserNameOrPassword - Error validating credentials due to invalid username or password.Also searched as: InvalidUserNameOrPassword
What it means
The user didn't enter the right credentials. Microsoft notes you should expect some number of these errors in your logs because users make mistakes. Repeated failures can lock the account through smart lockout, which shows up as AADSTS50053.
Common causes
- The user entered the wrong username or password.
How to fix it
Find the failing sign-in
In the Microsoft Entra admin center, go to Entra ID > Monitoring & health > Sign-in logs and filter by user, date and correlation ID. Or query the logs with Microsoft Graph PowerShell (needs AuditLog.Read.All); Microsoft recommends a time range so the request doesn't time out.
$since = (Get-Date).ToUniversalTime().AddDays(-7).ToString("yyyy-MM-ddTHH:mm:ssZ")
Get-MgAuditLogSignIn -Filter "status/errorCode eq 50126 and createdDateTime ge $since" -Top 10Check the account used
Compare the user principal name in the sign-in event with the account the user meant to use.
Reset the password if needed
An administrator can reset the user's password in the Microsoft Entra admin center, or the user can use self-service password reset if it's enabled.
How to confirm it's fixed
- The user's next sign-in succeeds and no new 50126 events appear for the account.
Related engineering templates
Follow Microsoft Entra ID failures and fixes
A short email about twice a week with new runbooks, configuration traps and fixes from KBY Technologies.