Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

get cn distinguished names of LDAP AD nested groups

NA SA
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 6, 2019

Greetings, 

I have an AD group named "testgroupmemAccess" that is a nested group, meaning the members of the group are groups vs users. I wanted to get the cn and distinguished names of all the subgroups under the group. I tried below, but it is not working: 

 

select cn, distinguishedName from openquery
(ADSI,
'SELECT cn, distinguishedName FROM ''LDAP://domain.tech.test/DC=dc1,DC=dc2,DC=dc3''
(&(objectCategory=''Person'')(sAMAccountName=''*'')(memberOf:1.2.840.113556.1.4.1941:=cn=''testgroupmemAccess'',
ou=users,DC=dc1,DC=dc2,DC=dc3))')

0 answers

Suggest an answer

Log in or Sign up to answer