// SQL Server error reference

SQL Server error 18488: Login failed, password must be changed

The SQL login is flagged MUST_CHANGE, so it has to set a new password before it can connect. Many drivers can't do that, so the login just fails.

Error number
18488
Severity
14
Category
Connection and login
Error message
Login failed for user '%.*ls'. Reason: The password of the account must be changed.%.*ls

What it means

A login created or reset with MUST_CHANGE must choose a new password the first time it connects. Tools such as SSMS and sqlcmd offer to change it during login; applications and many drivers don't, so they fail with 18488.

Common causes

  • The login was created or its password reset with MUST_CHANGE.
  • An application connects with a newly created login that was meant for a person to sign in with first.

How to fix it

  1. Have an administrator set a password without MUST_CHANGE.

    ALTER LOGIN app_user WITH PASSWORD = N'<new strong password>';
  2. Or sign in once with SSMS or sqlcmd, which prompt for the new password, then use that password in the application.

Related errors

More connection and login errors

The code and message text are from the Microsoft Database Engine events and errors reference. Browse the full SQL Server error list or search every database error.

// fewer errors, faster fixes

Work on SQL Server in SQLly

A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for SQL Server and the other databases you use.