I have a windows desktop application that gets the file access rules for a particular folder and displays them in a list box. The code is below. It displays everything, including system accounts (NTAuthority\System, NTAuthority\Local Server) with the individual user accounts (abc\mike.smith, abc\jan.jones). I'd like to filter out the system accounts and display only the user accounts. Is there a way to do this? I'm using C#, but this is my attempt at working with Active Directory. Thanks for any input.
private void GetFolderPerms()
Directory.Security dSecurity = Diectory.getAccessControl(@"C:\MyFolder');
foreach (FileSystemAccessRule rule in dSecurity.GetAccessRules(true, true, typeof(NTAccount)))