title: LDAP query to get account name from SID
body: <p>So I have a <code>SID</code> of a <code>FSP</code>: <code>S-1-5-21-2127521184-1604012920-1887927527-72713</code>.  </p>
  
  <p>Translation worked <a href="https://gallery.technet.microsoft.com/scriptcenter/PowerShell-Script-to-70cfc4fa#content" rel="nofollow noreferrer">in powershell</a> but I would like to do the ldap query by myself, like <a href="http://blog.schertz.name/2008/03/searching-ad-for-a-user-account-with-a-sid/" rel="nofollow noreferrer">here</a> but have a little trouble with proper <code>SID</code> conversion.</p>
  
  <p>Could you help me with query that give me a corresponding account name based on <code>SID</code> ?</p>