February 21, 2012 at 7:26 am
When a Domain Group is added it gives access to all its group members.
gut how to find Domain Group to whcih the Loged in user belongs to ?
February 21, 2012 at 7:55 am
From a stackoverflow article, OPENQUERY is used to query the active directory
select *
from OpenQuery(ADSI,
'SELECT objectCategory, cn, sn, mail, name, department
FROM ''LDAP://Mydomain/CN=users,DC=wl-domain,DC=com''
WHERE MemberOf=''cn=_____GROUPNAME_____,CN=users,DC=Mydomain,DC=com''
ORDER BY cn'
)
Replace your domain names and it should work.
Be sure to test before running in production.
February 21, 2012 at 9:20 am
and another way, via an extended stored proc:
EXEC master..xp_logininfo
@acctname = 'mydomain\lowell',
@option = 'all' -- Show all paths a user gets his auth from
go
EXEC master..xp_logininfo
@acctname = 'mydomain\authenticatedusers',
@option = 'members' -- show group members
Lowell
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply