Google Admin Directory Group List for User Email Returns Invalid Empty Response

I use the G Suite API to get a list of groups in which the email address (which is not necessarily a G Suite domain user) is a member using directory.groups.list:

GET https://www.googleapis.com/admin/directory/v1/groups?domain={DOMAIN}&userKey={QUERY_EMAIL_ADDRESS}&key={API_KEY}

This usually returns a list of groups that contain this email address. Sometimes, however, it incorrectly returns an empty list, although I know that the email address is a member of several groups, which I can check by specifying the members of the group in which I know that it is a member, and I can see that it is in the list.

200 OK

{
 "kind": "admin#directory#groups",
 "etag": "{ETAG}"
}

(the "groups" field does not mean that no results were found)

, , , , , . , , URL.

, , , , . - directory.members.list, ( directory.users.get, ). , , , , .

, , , ?

+4

Source: https://habr.com/ru/post/1694863/


All Articles