title: How to add service principal as an Owner to the Azure AD group through Graph API
body: <p>My requirement is to create a group in Azure AD and add a service principal as an owner of that group through Graph API - While creating the group.</p>
  <p>Reference Doc:
  <a href="https://docs.microsoft.com/en-us/graph/api/group-post-groups?view=graph-rest-1.0&amp;tabs=http" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/graph/api/group-post-groups?view=graph-rest-1.0&amp;tabs=http</a></p>
  <p>With reference to the above document, i am able to create group but the response object shown is not allowing service principal to be added as an Owner.</p>
  <p>Body :</p>
  <p>{
  &quot;description&quot;: &quot;Testing 123&quot;,
  &quot;displayName&quot;: &quot;SG-test-ei&quot;,</p>
  <p>&quot;mailEnabled&quot;: false,
  &quot;mailNickname&quot;: &quot;SGP-test-ei&quot;,
  &quot;securityEnabled&quot;: true,
  &quot;owners@odata.bind&quot;: [</p>
  <pre><code>    &quot;https://graph.microsoft.com/v1.0/users/qwbhty-cdd0-4c42-b857-5b8ce0ae6a9e&quot;
  ],
  &quot;members@odata.bind&quot;: [
      &quot;https://graph.microsoft.com/v1.0/users/7f3f587a-c40a-4a63-82b1-202f35c828ee&quot;
  ]
  </code></pre>
  <p>}</p>
  <p>Seems like, <a href="https://graph.microsoft.com/v1.0/users" rel="nofollow noreferrer">https://graph.microsoft.com/v1.0/users</a> does not recognize ObjectID for a service principal.</p>
  <p>My question is, what owners@odata.bind or API i should use in the body to add service principal as an Owner to the security group in Azure AD.</p>