LDAP Changes during Confluence 4.3 -> 5.1.4 Update

After an upgrade, this LDAP Query for AD Users suddenly fails:

(&(objectCategory=Person)(sAMAccountName=*)(!(sAMAccountName=SM*)(!(mail=*mailfdqn.eu*))))

with:
Test retrieve user : Failed
org.springframework.ldap.InvalidSearchFilterException: Filter (!) cannot be followed by more than one filters; nested exception is javax.naming.directory.InvalidSearchFilterException: Filter (!) cannot be followed by more than one filters; remaining name 'ou=TheCompanyName,ou=Microsoft Exchange Hosted Organizations,dc=mshosting,dc=local'

After tests, it seems that negations/not's does not work, as in:
(&(objectCategory=Person)(sAMAccountName=*)(mail=*mailfdqn.dk)(!(sAMAccountName=SM*))

But this works:
(&(objectCategory=Person)(sAMAccountName=*)(mail=*mailfdqn.dk))

 But I need the (!(sAMAccountName=SM*) to limit the amount of users sync'ed

2 answers

1 accepted

Resolution in the newly created KB: https://confluence.atlassian.com/pages/viewpage.action?pageId=385909189

My solution became:

(&(objectCategory=Person)(sAMAccountName=*)(mail=*mailfdqn.dk)(!(sAMAccountName=SM*)))

Hi Norman,

You may try this filter:

(&(objectCategory=Person)(sAMAccountName=*)(!(|(sAMAccountName=SM*)(mail=*mailfdqn.eu*))))

Cheers

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,916 views 27 12
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