LDAP/SAML Nickname Attribute Exceeding 64 Characters Causes "Invalid Nickname" Login Error

Applies to: Mattermost Server (all versions); deployments using LDAP or SAML with a Nickname attribute mapped in Mattermost.

Symptoms: A specific user receives "Invalid Nickname" and cannot log in. Their directory Nickname attribute exceeds 64 characters.


🛑 Problem

Mattermost enforces a hard-coded 64-character maximum for the Nickname field (set in source code and the database schema). When an LDAP or SAML attribute mapped to Nickname exceeds 64 characters, login is rejected with Invalid Nickname. This limit is not configurable.

  • Specific user cannot log in; other users with shorter nicknames unaffected
  • Issue appears for new users or after a directory attribute change

âś… Solution

Truncate the LDAP or SAML Nickname attribute to 64 characters or fewer in the directory.

  • Active Directory: Edit attribute in AD Users and Computers or via PowerShell/ADSI Edit
  • LDAP: Update via your LDAP management tool
  • SAML IdP: Update the attribute transformation/mapping rule to truncate

After truncating, the affected user can log in normally on the next attempt.

⚠️ The 64-character limit is not configurable. If recurring, consider submitting a feature request.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.