January 11, 2005 at 6:28 am
Is there a way I to find out if the specified user is a member of domain group? I cannot use is_member() because it evaluates the expression based on who is connected to SQL Server. This will not work in most web based scenarious where connection to the SQL Server is done using one standard account. I would like something like
is_member('user to evaluate', 'domain group')
Regards,
Jesbin
January 11, 2005 at 7:30 am
you can using ADSI as a linked server.
INFO: Performing a SQL Distributed Query by Using ADSI (299410)
Another solution is to extract the members of the groups you need to key on into a lookup table. Run it periodically and that means your normal queries aren't depending on a round-trip to a domain controller.
K. Brian Kelley
@kbriankelley
January 11, 2005 at 8:34 am
I am fortunate in that I develop intranet applications and can use Windows Authentication.
This means that a Windows group is granted login priviledges to SQL Server and that group login is added as a user attached to specific database roles within a particular database.
This means that I can use master..xp_logininfo to interogate a particular domain group, or all groups and user SELECT CURRENT_USER to identify the current user.
I'm not sure if this helps.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply