spacedeveloper
Programmer
Hi All,
I'd really appreciate some help on this. It's got me a bit stumped.
I am trying to retrieve all of the Groups that I am a member of from Active Directory. The follow to pieces of code are ways that I am attempting to do this. It works very well with other users...but not for me! It used to!
Another thing is that when I do go into AD to check what groups I am a "Member Of"...I, indeed, DO belong to the very Group I am querying.
Here is the code I have been using to accomplish this:
Any help would very much be appreciated.
Thank you
I'd really appreciate some help on this. It's got me a bit stumped.
I am trying to retrieve all of the Groups that I am a member of from Active Directory. The follow to pieces of code are ways that I am attempting to do this. It works very well with other users...but not for me! It used to!
Another thing is that when I do go into AD to check what groups I am a "Member Of"...I, indeed, DO belong to the very Group I am querying.
Here is the code I have been using to accomplish this:
Code:
ArrayList groups = new ArrayList();
foreach (System.Security.Principal.IdentityReference group in HttpContext.Current.Request.LogonUserIdentity.Groups)
{
groups.Add(group.Translate(typeof(System.Security.Principal.NTAccount)).ToString());
}
...then code to iterate through the Groups to find the one I am looking for...
Any help would very much be appreciated.
Thank you