I want to know if this user is a member of a group or not. Now I don’t know much about ActiveDirecory or Exchange servers, but in Outlook I can see that the user can be a “memberOf” group (and I can request these groups using DirectorySearcher.PropertiesToLoad.Add("memberof");), but there are other groups in which users are not active members. but which contain users. If you send mail to these groups (or aliases), you will reach all users included in it.
Basically, given a username (e.g. DOMAIN\JDoe), how do I check if it is contained in a group FUNNY_USERSin C #?
source
share