Method: members.hasMember
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
지정된 사용자가 그룹의 구성원인지 확인합니다. 멤버십은 직접 또는 중첩될 수 있지만 중첩된 경우 memberKey
및 groupKey
가 동일한 도메인의 항목이어야 합니다. 그러지 않으면 Invalid input
오류가 반환됩니다. 그룹의 도메인 외부의 항목이 포함된 중첩된 멤버십을 확인하려면 Cloud ID 그룹스 API의 checkTransitiveMembership()
메서드를 사용하세요.
HTTP 요청
GET https://admin.googleapis.com/admin/directory/v1/groups/{groupKey}/hasMember/{memberKey}
URL은 gRPC 트랜스코딩 문법을 사용합니다.
경로 매개변수
매개변수 |
groupKey |
string
API 요청에서 그룹을 식별합니다. 값은 그룹의 이메일 주소, 그룹 별칭 또는 고유 그룹 ID일 수 있습니다.
|
memberKey |
string
API 요청에서 사용자 구성원을 식별합니다. 값은 사용자의 기본 이메일 주소, 별칭 또는 순 사용자 ID일 수 있습니다.
|
응답 본문
Directory API의 Has Member 응답을 위한 JSON 템플릿
성공한 경우 응답 본문은 다음과 같은 구조의 데이터를 포함합니다.
JSON 표현 |
{
"isMember": boolean
} |
필드 |
isMember |
boolean
출력 전용입니다. 지정된 사용자가 그룹의 구성원인지 식별합니다. 멤버십은 직접 또는 중첩될 수 있습니다.
|
승인 범위
다음 OAuth 범위 중 하나가 필요합니다.
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
자세한 내용은 승인 가이드를 참고하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[],[],null,["# Method: members.hasMember\n\nChecks whether the given user is a member of the group. Membership can be direct or nested, but if nested, the `memberKey` and `groupKey` must be entities in the same domain or an `Invalid input` error is returned. To check for nested memberships that include entities outside of the group's domain, use the [`checkTransitiveMembership()`](https://cloud.google.com/identity/docs/reference/rest/v1/groups.memberships/checkTransitiveMembership) method in the Cloud Identity Groups API.\n\n### HTTP request\n\n`GET https://admin.googleapis.com/admin/directory/v1/groups/{groupKey}/hasMember/{memberKey}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|-------------|------------------------------------------------------------------------------------------------------------------------------------|\n| `groupKey` | `string` Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID. |\n| `memberKey` | `string` Identifies the user member in the API request. The value can be the user's primary email address, alias, or unique ID. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nJSON template for Has Member response in Directory API.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|---------------------------------|\n| ``` { \"isMember\": boolean } ``` |\n\n| Fields ||\n|------------|------------------------------------------------------------------------------------------------------------------------|\n| `isMember` | `boolean` Output only. Identifies whether the given user is a member of the group. Membership can be direct or nested. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://apps-apis.google.com/a/feeds/groups/`\n- `\n https://www.googleapis.com/auth/admin.directory.group`\n- `\n https://www.googleapis.com/auth/admin.directory.group.member`\n- `\n https://www.googleapis.com/auth/admin.directory.group.member.readonly`\n- `\n https://www.googleapis.com/auth/admin.directory.group.readonly`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]