Hi Guys,

I have a asp.net web form that takes in a local user email address, on page onload i want to query active directory using that email address, and a specific group in active directory. if the user is found in the group i show the remaining controls on the page or else i prevent the user from seeing the remainder of the controls.

Any idea how i can accomplish this?

I dont have the code handy at this particular moment, but have done work in this area prior. I'd recommend you start looking at System.DirectoryServices. DirectoryEntry and DirectorySearcher are the objects I would typical use to connect to get and search for info in AD.

You can also use Directory Entry to determine if a user account is a member of a group.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.