LDAP queries; users members of a group...  
Author Message
Sasan





PostPosted: Wed Aug 24 12:39:43 CDT 2005 Top

SQL Server >> LDAP queries; users members of a group...

Hi,

I'm looking for a query to read the active directory from SQL Server 2000.

Today I can access the AD and read it corretly.

But I have to find all users memberOf a group from an authorization point of
view!
so its a recursive query.

Because I want to identify all users belong the group "MyGroup", but this
group could contain other groups & users!
so I want to retrieve users under subgroups of the targeted group + users
under "MyGroup"...

any sample & simple query to do this?
if I can't do this in TSQL any sample VBScript?

thanks.

Jerome.

SQL Server143  
 
 
Al





PostPosted: Wed Aug 24 12:39:43 CDT 2005 Top

SQL Server >> LDAP queries; users members of a group... VBScript (or some sort of script) would be the way I've done this in the
past. I think RLMueller has some stuff on his website that could be
adapted.
Basically, the logic is to use a dictionary object to prevent listing a
found object more than once and it checks the ObjectCategory to figure out
if it needs to go after that or if it is a user.

I've got some code lying around somewhere that does similar. Drop a note
offline if you get stuck and I'll see if I can dig it up. Could take a
little while to find it though.

Al




> Hi,
>
> I'm looking for a query to read the active directory from SQL Server 2000.
>
> Today I can access the AD and read it corretly.
>
> But I have to find all users memberOf a group from an authorization point
> of view!
> so its a recursive query.
>
> Because I want to identify all users belong the group "MyGroup", but this
> group could contain other groups & users!
> so I want to retrieve users under subgroups of the targeted group + users
> under "MyGroup"...
>
> any sample & simple query to do this?
> if I can't do this in TSQL any sample VBScript?
>
> thanks.
>
> Jerome.
>
>