Skip to main content

Password does not meet the requirements -SQL server only

In this article, we explore why SQL Server shows a misleading password error when a user ID exception occurs in MSSQL.

Y
Written by Yusef Abulaynain
Updated over 6 months ago

This issue has been fixed in version 25.1.1.0.

The problem is that the error message was misleading. Rather than a password issue, one of the following was occurring when trying to create a new user.

  1. The login already exists, e.g. User created on another database on same server. This throws the following server-side error: 'com.microsoft.sqlserver.jdbc.SQLServerException: The server principal '#USERID#' already exists'

  2. Login does not exist, but a User exists as a login on the server; the create login fails. This throws the following server-side error: 'com.microsoft.sqlserver.jdbc.SQLServerException: User, group, or role '#USERID#' already exists in the current database.'

Did this answer your question?