Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

LDAP Changes during Confluence 4.3 -> 5.1.4 Update

B_ Normann P_ Nielsen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 16, 2013

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

0 votes
Answer accepted
B_ Normann P_ Nielsen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 17, 2013

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*)))
1 vote
Tiago Comasseto
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 16, 2013

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
TAGS
AUG Leaders

Atlassian Community Events