title: Read Active Directory ACEs
body: <p>I am trying to read AD ACEs. The problem is, I can see the Rights, inheritance etc, but the ObjectType (which is the name of the ACE is in GUID format). I am trying to get the friendly name of the ObjectType. Here is my code</p>
  
  <pre><code>System.DirectoryServices.DirectoryEntry userEntry = new DirectoryEntry("LDAP://xx");
  
  System.Security.AccessControl.AuthorizationRuleCollection rules = userEntry.ObjectSecurity.GetAccessRules(true, true, typeof(System.Security.Principal.SecurityIdentifier));
  
  foreach (System.Security.AccessControl.AuthorizationRule rule in rules)
  {
     System.DirectoryServices.ActiveDirectoryAccessRule oar = rule as System.DirectoryServices.ActiveDirectoryAccessRule;
     Console.WriteLine(oar.ObjectType.ToString()); //GUID
     ....                     
  }
  </code></pre>
  
  <p>Please suggest me how can I get the Object Name, or maybe there is a different API that I should use.</p>
  
  <p>Thanks</p>