Username and OIDC integration

Hi Team,

I tried to run some tests in Mattermost Cloud to evaluate Mattermost Enterprise Edition.

After setting up OIDC (OpenID Connect), I found that Mattermost tends to use the user’s email prefix as the username instead of the preferred_username provided in the OIDC Profile.

Is there any way to change this setting?


Hello, @Zero

While the OpenID Connect documentation does not explicitly mention if there is any possibility of configuring specific attribute for username, may I know if you are open to create a suggestion in Mattermost Uservoice?

Let me know if you prefer me to raise it on your behalf. Thanks.

Hi, @ahmaddanial

I have created UserVoice suggestions.

However, using the preferred_username claim as a username is part of the OIDC specification, so please consider a more standardized implementation of OIDC.

  • Claim Name: preferred_username
  • Claim Description: Shorthand name by which the End-User wishes to be referred to
  • Change Controller: OpenID Foundation Artifact Binding Working Group -
  • Specification Document(s): Section 5.1 of this document
1 Like

Hi again, @Zero

Got it and thanks for the details. I am putting the link out here for reference purposes for other users who are also interested with the same implementation of OpenID Connect: