Last post Feb 26, 2009 03:34 AM by johram
Feb 20, 2009 12:21 PM|kcrewjap|LINK
I am trying to return the Active Directory Group name of the current logged in user. i have the following code below.. what am i doing wrong? the code i have is bringing ALL active directory group names.
LabelIdentityGroup.Text = grps;
Feb 21, 2009 05:52 PM|johram|LINK
What group are you trying to return? The primary group (domain users)? As long as your user is member of more than one group, your code will (correctly) enumerate all of them.
Feb 23, 2009 12:38 PM|kcrewjap|LINK
Thanks for the reply. i am trying to check their current group. The group that gives them access to the page. Does that make sense?
Feb 23, 2009 02:36 PM|johram|LINK
I'm afraid not. There may be several groups that give access to the page. It depends on how your security is set up. You'll need to provide more details for your case. Thank you.
Feb 23, 2009 03:54 PM|kcrewjap|LINK
okay, i need to know if the user is in NTGroups: UDD_admin, UDD_assigner or UDD_approver.. does this help?
Feb 26, 2009 03:34 AM|johram|LINK
Well, then you're almost there already. In your code, you have a loop which iterates over the groups that the current user is member of. You can add code in that loop to check if the name of the group is any of the three and then return true. If none of
these groups are found, return false. Good luck!