Home All Groups Group Topic Archive Search About

How do I get array of users security groups (NOT builtin)

Author
29 Sep 2005 1:35 PM
Byron
I need to get an array of security groups the current user is a member of.  I
don't care about the builtin groups.  I use an array of windows security
groups the application relies on for internal security to enable menu items,
allow actions, etc. within the application, so I need to get an array of the
security groups the current user is a member of so I can compare them to the
hard-coded array to determine their level of access within the application.

If I was using builtin groups membership it would be easy, but I'm not.

Any help would be greatly appreciated.

Author
29 Sep 2005 7:29 PM
Dominick Baier [DevelopMentor]
Hello Byron,

in 1.1 there is only a hack -
http://weblogs.asp.net/pglavich/archive/2004/09/29/235670.aspx

in 2.0 this is officially supported by the WindowsIdentity class
http://www.leastprivilege.com/GettingAllGroupsForAWindowsAccountInNET20.aspx

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

Show quoteHide quote
> I need to get an array of security groups the current user is a member
> of.  I don't care about the builtin groups.  I use an array of windows
> security groups the application relies on for internal security to
> enable menu items, allow actions, etc. within the application, so I
> need to get an array of the security groups the current user is a
> member of so I can compare them to the hard-coded array to determine
> their level of access within the application.
>
> If I was using builtin groups membership it would be easy, but I'm
> not.
>
> Any help would be greatly appreciated.
>



Post Thread options