LDAP authentication create user

Sonarqube Version : Enterprise 9.9

i have setting the authentication with ldap below:

User Configuration

ldap.user.baseDn=DC=xxx,DC=xxx,DC=xx,DC=xx
ldap.user.request=(&(objectClass=person)(sAMAccountName={login}))
ldap.user.realNameAttribute=cn
ldap.user.emailAttribute=mail

but why when the user login with their ldap user and password the user created is random and not using the sAMAccountName ?

What do you mean by random? What do you see in SonarQube?

Hi Colin,

the user is login with ldap user for example = 12345
but then on sonarqube the user generate is name-number

Screen Shot 2023-06-14 at 13.45.44

Thanks.

Can you confirm you’re using LDAP authentication, and not say, SAML-based authentication (I would expect this behavior there, and I can go into some details, but I don’t expect it with LDAP).

Hi Colin,

Confirmed we are using LDAP authentication.
we setup below configuration on sonar.properties:
sonar.realm=example.com
sonar.security.realm=LDAP
sonar.security.savePassword=true
sonar.authenticator.downcase=true
sonar.forceAuthentication=true

Can you tell me what the response from this URL is on your SonarQube instance?

https://<your_sonarqube_url>/api/users/identity_providers

Hi,

the result :

{“identityProviders”:}

Hi Colin,

What’s the expected result on the url response if we configure LDAP?
on our instance the response is :
{“identityProviders”:}