User ID shown instead of display name of LDAP user (MS Active Directory)

Nextcloud version (eg, 18.0.2): 19.0.1
Operating system and version (eg, Ubuntu 20.04): CentOS 8
Apache or nginx version (eg, Apache 2.4.25): nginx
PHP version (eg, 7.1): 7.4.9
LDAP server: MS Server 2019 Active Directory

The issue you are facing:

When going in NC to user search button on main page (top right, next to user icon) all LDAP users from MS Active Directory are listed by user ID (UID) instead of by display name (displayName).

The expected behaviour is to see users listed by display name (AD field displayName) and not by the NC internal name.

To use UID from LDAP as internal user name for NC is intentional. When going to the menu “users” all LDAP users are listed correctly with both UID as user name and display name as it should be.

Is this the first time you’ve seen this error? (Y/N): N

Steps to replicate it:

  1. LDAP setting - expert - internal user name: empty (to use UIL as internal name for NC)
  2. LDAP settings - advanced - folder settings - field for display name of user: displayName
  3. go to user search button



There’s an option you can change to use the sAMAccountName instead of the GUID as the Nextcloud username. I don’t think using displayName as the user name will work.

Yes, the possibility to use sAMAccountName to define NC internal name I know. But NC recommendation is to use unique GUID for internal user name.

Acc. my understanding the name to display and the name use for identification are two different things and NC can handle both. NC also is reading both correctly out of LDAP (UID and displayName) and is building the internal name correctly out of UID filed. But NC shows the internal name of the user instead of display name. And to display user by displayname is what I want.

how can I do that?

Go to the settings od the LDAP integration in Nextcloud. Then choose the “users” tab in the config. Choose advanced. Then second expand option (mine is in danish, and is called "folder settings (translated) so I do not know the name). There is configs for which attributes to show when displaying users.

This is about display name I think. I try to create user directory in /data by using displayname

No you asks how to DISPLAY something different, In another thread you asks about the foldernames.