title: How to get user id from email address in Microsoft Graph API C#
body: <p>I want to add User to a Group but I don't have the User's <code>id</code>, I only have the email address.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>User userToAdd = await graphClient
      .Users["objectID"]
      .Request()
      .GetAsync();
  
  await graphClient
      .Groups["groupObjectID"]
      .Members
      .References
      .Request()
      .AddAsync(userToAdd);
  </code></pre>
  
  <p>Can someone help how do I retrieve ObjectId (User ID) from an email address using Microsoft Graph?</p>