تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
للتحقّق مما إذا كان المستخدم المحدّد عضوًا في المجموعة. يمكن أن يكون الاشتراك مباشرًا أو متداخلًا، ولكن في حال كان متداخلًا، يجب أن يكون memberKey وgroupKey عنصرَين في النطاق نفسه أو سيتم عرض خطأ Invalid input. للتحقّق من العضويات المُدمجة التي تتضمّن كيانات خارج نطاق المجموعة، استخدِم طريقة checkTransitiveMembership() في Cloud Identity Groups API.
طلب HTTP
GET https://admin.googleapis.com/admin/directory/v1/groups/{groupKey}/hasMember/{memberKey}
لتحديد المجموعة في طلب واجهة برمجة التطبيقات. يمكن أن تكون القيمة عنوان البريد الإلكتروني للمجموعة أو الاسم البديل للمجموعة أو رقم تعريف المجموعة الفريد.
memberKey
string
لتحديد المستخدم المشارِك في طلب واجهة برمجة التطبيقات يمكن أن تكون القيمة عنوان البريد الإلكتروني الرئيسي للمستخدم أو الاسم البديل أو رقم التعريف الفريد.
نص الطلب
يجب أن يكون نص الطلب فارغًا.
نص الاستجابة
نموذج JSON لاستجابة Has Member في Directory API
إذا كانت الاستجابة ناجحة، سيحتوي نص الاستجابة على بيانات بالبنية التالية:
تمثيل JSON
{"isMember": boolean}
الحقول
isMember
boolean
النتائج فقط. لتحديد ما إذا كان المستخدم المحدَّد عضوًا في المجموعة. يمكن أن يكون الاشتراك مباشرًا أو متداخلًا.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],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)."]]