Authentication fails on initial LDAP User Login

Hi everyone,

I am new to this forum, this is my first topic, so if i forget something, please let me know.

I’m using SonarQube 8.4 Community Edition.
I’m trying to connect our Active Directory via LDAP connection. I am doing this using the file.
I want users of one of our AD Group to log in.

As I understand, the LDAP configuration is divided into three parts.

  1. First, I connect via the “general” configuration part of the .properties file:

This works !

  1. I set the user mapping


This seems to work ! (I get no exception on startup)

  1. I set the group mapping Groups,OU=Groups,OU=1_GlobalServices,OU=Our_GlobalRights{login}))

Here, I also don’t get an exception on startup.

What I also did was adding Sonar User Groups with the same name as the Groups in our AD. As far as I understand, this is necessary, so when a user is logging in for the first time, this user will be assign to the particalur group he/she is part of in the AD.
The group I want them to be added to is part of the CN of the

But now, when I want to log in with a user, my authentication fails.
The logging says:

web[AXSMy5JI33FsbUosAAAU][auth.event] login failure [cause|Unable to retrieve groups for user *** in ][method|FORM]

This seems to be caused by
javax.naming.NamingException: [LDAP: error code 1 - 000020D6: SvcErr: DSID-031007E5, problem 5012 (DIR_ERROR), data 0

When I google this behaviour, I dont really get any usefull results. As far as I understand, I could be caused by a wrong, but that is more of a guess. When I add my Group as CN Prefix in the, the server doesn’t even startup.

I hope, I could describe my problem properly and hope that someone can help me with this.


Hi everyone,
I found the solution myself.
It was rather simple, all I had to do, was adding the domain to my BaseDN for the group. The directory error was based on the fact, that a reference to the parent directory folder was missing.
So I simply changed Groups,OU=Groups,OU=1_GlobalServices,OU=Our_GlobalRights
to Groups,OU=Groups,OU=1_GlobalServices,OU=Our_GlobalRights,DC=ourdomain,DC=com

That’s it :slight_smile:

I hope, everyone who might have a similar error can use this solution.


Thanks @chauser for sharing here the solution of your problem !

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.