Checks whether the given user is a member of the group. Membership can be direct or nested.
HTTP request
GET https://admin.googleapis.com/admin/directory/v1/groups/{groupKey}/hasMember/{memberKey}
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
groupKey |
Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID. |
memberKey |
Identifies the user member in the API request. The value can be the user's primary email address, alias, or unique ID. |
Request body
The request body must be empty.
Response body
If successful, the response body contains data with the following structure:
JSON template for Has Member response in Directory API.
JSON representation |
---|
{ "isMember": boolean } |
Fields | |
---|---|
isMember |
Output only. Identifies whether the given user is a member of the group. Membership can be direct or nested. |
Authorization Scopes
Requires one of the following OAuth scopes:
https://apps-apis.google.com/a/feeds/groups/
https://www.googleapis.com/auth/admin.directory.group
https://www.googleapis.com/auth/admin.directory.group.member
https://www.googleapis.com/auth/admin.directory.group.member.readonly
https://www.googleapis.com/auth/admin.directory.group.readonly
For more information, see the OAuth 2.0 Overview.