Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get domain group? 1

Status
Not open for further replies.

ColinM

Programmer
Jun 29, 2000
189
TH
How can I get the domain group from a login?
i.e.

DOMAIN\Group is a NT Group Login
DOMAIN\User is a member of this group

when DOMAIN\User logs in I want to be able to identify what group they belong to.
Is this possible in SQL?

Using this:
select user_name() as [User], suser_sname() as Login

gives me an output like this:

User Login
---- -----
dbo DOMAIN\User


 
try the extended procedure xp_logoninfo. I can't tell for sure from the documentation but it looks like the permissionpath field will return what you want.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top