LDAP Searrch query error


In our old server environment we have had an search query with this format : (&(sAMAccountName=*)) which has been workin but when we uppgrade to a new server environment the search query above gives an Exception in our loga like this: javax.naming.directory.InvalidSearchFilterException: Unbalanced parenthesis; remaining name

Would be nice to receice some suggestions how to correct the LDAP search query



2 answers


Hi Thomas, in old version of JIRA and Confluence you had to escape the ampersand symbol and the exclamation mark symbol before adding to your XML file (see here), but in the current versions you can simply use (sAMAccountName=*), which should return the same result.


Thank You. So If I understand You correctly I could just write (sAMAccountName=*) and drop the ampersand part in my original search query

Hi Thomas, yes that's correct. The equivalent to your old filter in newer versions of JIRA is just (sAMAccountName=*)

Just one additional information, since you're using the attribute sAMAccountName, I assume you're connecting JIRA with AD, is that right?

If so, it may be better use the user filter as (&(objectCategory=Person)(sAMAccountName=*)) otherwise the synchronization may pull other LDAP objects that are not users to your JIRA application.

I hope it helps.


Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,173 views 13 19
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot