列出指定 userKey 时不起作用的组

list groups not working when specifying a userKey

我尝试接收一个用户的所有组。为此,我想使用列表用户端点: https://developers.google.com/admin-sdk/directory/v1/reference/groups/list

它工作正常,除非我指定 userKey。在那种情况下,我得到

{ [Error: Bad Request]
  code: 400,
  errors:
   [ { domain: 'global',
       reason: 'badRequest',
       message: 'Bad Request' } ] }

我正在为 node.js 使用 google-api 包。我为 userKey

尝试了 primaryEmailid

我明白了。您不能同时使用 customer 字段和 userKey 字段。

删除 customer 字段解决了问题。