Showing posts with label Active Directory. Show all posts
Showing posts with label Active Directory. Show all posts

Sunday, 11 November 2012

Identifying Active directory group members using TSQL on MS SQL Server

exec master.dbo.xp_logininfo 'DomainName\GroupName','members'

Prerequisites: Requires membership in the sysadmin role for the database server.
Requires EXECUTE permission for this stored procedure within the master database.

P.S.
By experiments, I  noticed that I could enumerate only members for groups to which I belong.