Query LDAP Groups



I am wanting to create a sql query to get the Members of a Active Directory
group. I am using the below code:

SELECT * FROM OPENQUERY( ADSI,
'SELECT Name FROM ''LDAP://DC=DOMAIN,DC=com''
WHERE objectCategory = ''group'' and memberof = ''groupname''')

How ever this dose not work. What I need is basicly to search active
directory and get the logon name if the user is a member of a spacific domain
group.

Any help would be really great.

Thanks
.



Relevant Pages

  • Re: WindowsPrincipal.IsInRole not working
    ... > That is an Active Directory question, but you should be able to change the ... > type of the group unless it contains members that they current group ... be a good way to start down the path of 'knowing when you should use it'! ...
    (microsoft.public.dotnet.security)
  • Re: Active Directory as a X.500 metadirectory
    ... A group object can contain other objects, ... The group object's members attribute contains the DN of each member. ... >>> Active Directory is a little new from the vantage of its implementation, ... >>> console, the containers appear empty, even though, for example the ...
    (microsoft.public.win2000.active_directory)
  • Re: Public Folder Forwarding
    ... It shows only mailbox-enabled objects when you're ... adding members. ... Multiple Contacts are configured in Active Directory ... you could set up a distribution group ...
    (microsoft.public.exchange.admin)
  • ISA server 2004 is not checking AD for groups membership of groups added in the user sets?
    ... whose only members are domain's Active Directory Users, ... same firewall policy with a user sets called "NAVIGATION BY GROUPS" ... Active Directory Groups this rule doesn't WORKS, ...
    (microsoft.public.isaserver)
  • Active Directory Only Displays Local Objects
    ... all set up as members of the domain. ... The SBS Server is the DC. ... up/restore Active Directory and restore it, ... the only thing displayed is the local computer. ...
    (microsoft.public.windows.server.active_directory)