User page name wrongly named after LDAP attributes

Motivations are a bit hard to recall, since I set them up more than six months ago, but I’ll try.

I found my previous thread asking for support: LDAP authenticator and user names / user pages

I see in the above-mentioned thread that the page name http://.../view/XWiki/<Lastname><Firstname> is what I wanted*, so I guess the two in (1) were created before that thread and the reconfigurations involved.

*: but maybe I’ll change my mind here, I’m thinking about it.

Well… this is the comment about userPageName (from https://extensions.xwiki.org/xwiki/bin/view/Extension/LDAP/Authenticator/)

#-# The XWiki page name pattern.
#-# The supported syntax is org.apache.commons.lang3.text.StrSubstitutor one,
#-# see http://commons.apache.org/proper/commons-lang/javadocs/api-3.0/org/apache/commons/lang3/text/StrSubstitutor.html for more details.
#-# Can use:
#-# * the LDAP fields listed in xwiki.authentication.ldap.fields_mapping by prefixing it with "ldap." as in ${ldap.givenName}
#-# * xwiki.authentication.ldap.remoteUserParser regex groups
#-# * a properties defined in xwiki.authentication.ldap.remoteUserMapping
#-# 
#-# The following suffixes can be added:
#-# * "._lowerCase": the lower case version of the string
#-# * "._upperCase": the upper case version of the string 
#-# * "._clean": a version of the string stripped from ".", ":", ",", "@", "^", "/" characters and "\s" (all forms of white spaces).
#-#             It can itself be suffixed with "._lowerCase" and "._upperCase".
#-#
#-# In this example the XWiki user profile page name will be of the form MYDOMAIN-myuid
# xwiki.authentication.ldap.userPageName=${domain}-${uid}
#-#
#-# The default is; "${uid}".
# xwiki.authentication.ldap.userPageName=${uid}

It says I can use

the LDAP fields listed in xwiki.authentication.ldap.fields_mapping by prefixing it with “ldap.” as in ${ldap.givenName}

although I have to admit that the passage:

[…] listed in xwiki.authentication.ldap.fields_mapping […]

is not so clear to me, since I have no idea to what user property I could map that.

However, sAMAccountName is an attribute present in our LDAP where the (local domain) username is stored (and I guess it was fine up to a point, since the first user pages are named after its value); but I as in my last post , I see I left the configuration unfinished.

Can I ask a clarification about:

#-# Specifies the LDAP attribute containing the identifier to be used as the XWiki name
#-# The default is:
# xwiki.authentication.ldap.UID_attr=cn

What exacly is that XWiki name? That’s probably where my doubts started.