title: Google Admin Directory group list for user e-mail returns wrong empty response
body: <p>I'm using the G Suite Admin Directory API to retrieve a list of groups that an e-mail address (that is not necessarily a user of the G Suite domain) is a member of, using <code>directory.groups.list</code>:</p>
  
  <p><code>GET https://www.googleapis.com/admin/directory/v1/groups?domain={DOMAIN}&amp;userKey={QUERY_EMAIL_ADDRESS}&amp;key={API_KEY}</code></p>
  
  <p>This normally returns a list of groups that contain that e-mail address. Sometimes, however, it incorrectly returns an empty list, even though I know that the e-mail address is a member of multiple groups, which I can verify by listing the members of a group that I know it is a member of, and I can see it is in the list.</p>
  
  <pre><code>200 OK
  
  {
   "kind": "admin#directory#groups",
   "etag": "{ETAG}"
  }
  </code></pre>
  
  <p><em>(no "groups" field means no results found)</em></p>
  
  <p>It seems to consistently fail for some e-mail addresses, but there seems to be no logic behind the specific addresses for which it fails. There are no special characters, no special roles, and they are all properly URL-encoded.</p>
  
  <p>I have found that when I use an immutable id that is associated with the e-mail address, the correct list of groups is returned. The only way to get such an immutable id, however, is to get it from a response for  <code>directory.members.list</code> that contains that e-mail address (I would use <code>directory.users.get</code>, but they are external e-mail addresses). I can't rely on that, however, because I obviously don't know in advance which groups I can use to find the id.</p>
  
  <p><strong>Is there a way for me to fix these incorrectly empty responses, or, alternatively, is there a way to find out the immutable id assigned to an external e-mail address?</strong></p>