title: UserPrincipal.GetAuthorizationGroups throws exception
body: <p>In the following code</p>
  
  <pre><code>PrincipalContext* context = new PrincipalContext(ContextType::Domain, domainName);
  UserPrincipal* user = UserPrincipal::FindByIdentity(context, IdentityType::SamAccountName, userName);
  PrincipalSearchResult&lt;Principal*&gt;* groups = user-&gt;GetAuthorizationGroups();
  </code></pre>
  
  <p>I get the following exception:</p>
  
  <blockquote>
    <p>Message: Object reference not set to an instance of an object.</p>
  </blockquote>
  
  <p><strong>Exception call stack:</strong></p>
  
  <pre><code> at System.DirectoryServices.AccountManagement.Principal.CheckDisposedOrDeleted()
   at System.DirectoryServices.AccountManagement.UserPrincipal.GetAuthorizationGroupsHelper()
   at System.DirectoryServices.AccountManagement.UserPrincipal.GetAuthorizationGroups()
  </code></pre>
  
  <p>Any idea why the internal method fails? How can the user be deleted or disposed, or what has happened?</p>