title: How to get SID for user resource in MS Graph?
body: <p>I am using MS Graph REST API for retrieving users and groups in Azure AD. I see presence of SID fields in case of AD DS replication to Azure AD. Also Groups have dedicated field for representing SID in the Windows world in case of pure Azure AD groups (without being replicated from corporate AD DS):</p>
  <pre><code>    {
          &quot;id&quot;: &quot;00098024-e3bb-46d2-88ba-8664360c7bb9&quot;,
          &quot;onPremisesDomainName&quot;: null,
          &quot;onPremisesLastSyncDateTime&quot;: null,
          &quot;onPremisesNetBiosName&quot;: null,
          &quot;onPremisesSamAccountName&quot;: null,
          &quot;onPremisesSecurityIdentifier&quot;: null,
          &quot;onPremisesSyncEnabled&quot;: null,
          &quot;securityIdentifier&quot;: &quot;S-1-12-1-622628-1188225979-1686551176-3111849014&quot;
      }
  </code></pre>
  <p>But there is no such field in case of User documentation (even in Beta <a href="https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-beta" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-beta</a> ).  I know undocumented way of GUID ID to SID conversion. Like in this article: <a href="https://kb.policypak.com/kb/article/862-how-do-i-get-azure-ad-sids-and-use-them-with-item-level-targeting/" rel="nofollow noreferrer">https://kb.policypak.com/kb/article/862-how-do-i-get-azure-ad-sids-and-use-them-with-item-level-targeting/</a> According to Groups this way is working, but it is undocumented and may be altered any time by Microsoft.</p>
  <p>Is there a documented way to get SID in this case?</p>