title: UserPrincipals.GetAuthorizationGroups An error (1301) occurred while enumerating the groups. The group's SID could not be resolved
body: <p><strong>Background:</strong></p>
  <p>I've been using <code>UserPrincipal.GetAuthorizationGroups</code> for a while now to check permissions in 2 different applications.  They have been working fine for several years.  Recently some users have been getting the error mentioned in the title (<code>System.DirectoryServices.AccountManagement.PrincipalOperationException</code>) while others have not.  I have a suspicion that it might be related to a new domain controller that was added running on Windows Server 2012 because the problems started the day after it was added.  The full error is listed below:</p>
  <p><strong>Exception:</strong></p>
  <blockquote>
  <p>System.DirectoryServices.AccountManagement.PrincipalOperationException:
  An error (1301) occurred while enumerating the groups.  The group's
  SID could not be resolved.</p>
  <p>at System.DirectoryServices.AccountManagement.SidList.TranslateSids(String target, IntPtr[] pSids)
  at System.DirectoryServices.AccountManagement.SidList..ctor(SID_AND_ATTR[] sidAndAttr)</p>
  <p>at System.DirectoryServices.AccountManagement.AuthZSet..ctor(Byte[] userSid, NetCred credentials,
  ContextOptions contextOptions, String flatUserAuthority, StoreCtx userStoreCtx, Object userCtxBase)</p>
  <p>at System.DirectoryServices.AccountManagement.ADStoreCtx.GetGroupsMemberOfAZ...p)</p>
  <p>at System.DirectoryServices.AccountManagement.UserPrincipal.GetAuthorizationGroups</p>
  </blockquote>
  <p><strong>Question:</strong></p>
  <p>How do I fix this?</p>