Active Directory User Filter Does Not Search Nested Groups

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

An Active Directory (AD) user object filter to pull in users from a specific group does not recursively search groups nested under the specified group, even though recursion is enabled. A filter like the following is used:

(&(objectCategory=Person)(sAMAccountName=*)(memberOf=cn=TestGroup,ou=Groups,ou=CompanyUsers,dc=test,dc=corp))

Cause

JIRA uses basic LDAP syntax rules for searching. By default, any searches with memberOf will only check direct attributes, so AD will only return information back to JIRA based on direct attribute checks.

To get a recursive search, or to have AD check relations, extra properties need to be included to the filter. In this case, the string 1.2.840.113556.1.4.1941 will need to be added. According to Microsoft:

The string 1.2.840.113556.1.4.1941 specifies LDAP_MATCHING_RULE_IN_CHAIN. This applies only to DN attributes. This is an extended match operator that walks the chain of ancestry in objects all the way to the root until it finds a match. This reveals group nesting. It is available only on domain controllers with Windows Server 2003 SP2 or Windows Server 2008 (or above).

For more information, see the following from Technet:

Resolution 

  • Modify the User Object filter to include the extended match operator: 1.2.840.113556.1.4.1941 

    (&(objectCategory=Person)(sAMAccountName=*)(memberOf:1.2.840.113556.1.4.1941:=cn=TestGroup,ou=Groups,ou=CompanyUsers,dc=test,dc=corp))
    

Last modified on Nov 25, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.