title: Getting primary domain SID without admin privileges
body: <p>I'm trying to obtain computer's primary domain SID on windows using C++. I have manged to do that using <code>LsaQueryInformationPolicy</code> with <code>PolicyPrimaryDomainInformation</code>parameter. I've opened LSA policy for this operation as given:</p>
  
  <pre><code>auto lsaStatus = LsaOpenPolicy(Server, &amp;ObjectAttributes, GENERIC_READ | POLICY_VIEW_LOCAL_INFORMATION, &amp;PolicyHandle);
  </code></pre>
  
  <p>Unfortunatelly, using <code>LSAOpenPolicy</code> requiers administrator privileges to run and for the project I'm working on, it cannot, since most of the users will not have it. My question is - is there any way of obtaining current computer's primary domain SID without invoking admin rights? If there is, how should I go about doing that using Visual C++/MFC?</p>