I want to return a list of group memberships for a specific domain user. Something like...
string[] UserGroups(string domain, string domainUserName)
{
// query domain info
// return a list of accounts the user is a member of
}
Also, I want to be able to see which domain accounts/groups have access to a specified file/folder.
string[] AllowedAccounts(string domain, string filePath)
{
// query file/folder permission
// return a list of accounts with access to file/folder
}
What is the best way to perform these two tasks using c#?