title: c# DirectoryEntrie Propertie allowedAttributesEffective is always null
body: <p>I have a very old project that worked like a charm for many years.<br />
  All of a sudden It seems that the following code snippet is only returning false because the <em>&quot;allowedAttributesEffective&quot;</em> property is null, and therefore thinking that the user has no rights to Modify an AD object</p>
  <pre><code>public static bool checkWritePermission(DirectoryEntry de) {
    de.RefreshCache(new string[] { &quot;allowedAttributesEffective&quot; });
    log.write(&quot;Write permission == &quot; + (bool)(de.Properties[&quot;allowedAttributesEffective&quot;].Value != null), 5);  
    // Outputs always -&gt; &quot;Write permission == False&quot;  
    return de.Properties[&quot;allowedAttributesEffective&quot;].Value != null;
  }
  </code></pre>
  <p>The &quot;original&quot; codes taken years ago from here: <a href="https://stackoverflow.com/questions/4931982/how-can-i-check-if-a-user-has-write-rights-in-active-directory-using-c">How can I check if a user has write rights in Active Directory using C#?</a></p>
  <p>In reality the user that executes this code should have modify permissions on all AD Objects (proven by the fact that I can Modify all objects in question via Active Directory Users and Computers Management Interface)</p>
  <p>Any Ideas what the issue could be here?<br />
  I have also tried with ldapsearch on linux to see if I can read the property <em>&quot;allowedAttributesEffective&quot;</em> but I have not found a clear answer if that should even be the case as it is not returning anything on any LDAP object</p>