Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Mengelola akhir masa berlaku keanggotaan
Halaman ini menjelaskan cara memperbarui dan mengambil setelan masa berlaku untuk keanggotaan
grup, dan notifikasi masa berlaku yang diterima pemilik grup.
Masa berlaku keanggotaan memungkinkan pemilik grup, pengelola grup, Admin Super Google Workspace, atau Admin yang Didelegasikan Workspace dengan hak istimewa admin grup untuk mengelola grup dan akses berbasis grup ke resource. Akses dapat dibatasi berdasarkan
ketidakaktifan langganan atau kebutuhan sementara tanpa menghapus anggota secara manual.
Groups API memungkinkan masa berlaku keanggotaan untuk kasus penggunaan berikut:
Akses berbatas waktu ke resource (misalnya, untuk mengizinkan seseorang membantu
memecahkan masalah dalam produksi)
Keanggotaan sementara dalam grup komunikasi (misalnya, untuk menyertakan seseorang dalam grup tim untuk project jangka panjang)
Masa berlaku dapat diterapkan ke semua jenis anggota grup (termasuk pengguna,
grup, dan akun layanan) jika mereka memiliki peran MEMBER. Saat Anda menetapkan masa berlaku untuk anggota yang merupakan grup, masa berlaku tersebut menjadi masa berlaku default untuk semua anggota turunan grup tersebut, kecuali jika anggota turunan memiliki keanggotaan langsung di grup induk dengan masa berlaku individual yang sudah diterapkan. Masa berlaku juga berlaku untuk semua anggota baru grup turunan
ke depannya.
Untuk memperbarui masa berlaku langganan, panggil
groups.memberships.modifyMembershipRoles()
dengan ID grup induk, ID langganan, dan resource
UpdateMembershipRolesParams. Karena anggota dapat memiliki lebih dari satu MembershipRole
dalam grup, Anda harus menentukan peran mana yang akan memiliki masa berlaku. Saat ini,
hanya peran MEMBER yang dapat memiliki masa berlaku yang diterapkan.
Untuk mengambil masa berlaku langganan, panggil
groups.memberships.get()
dengan ID grup induk dan ID langganan.
Notifikasi email
Notifikasi email otomatis dikirim ke semua pemilik grup saat langganan
akan segera berakhir. Notifikasi dikirim 72 jam sebelum habis masa berlakunya atau langsung jika masa berlaku keanggotaan akan berakhir sebelum 72 jam saat ditetapkan.
Notifikasi dikirim dalam bahasa pilihan setiap pemilik grup, seperti yang ditentukan oleh admin domain di konsol Google Admin atau oleh pemilik grup secara terpisah.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-18 UTC."],[[["\u003cp\u003eThis feature enables managing group memberships with expiration dates, allowing for time-limited access to resources or temporary inclusion in communication groups.\u003c/p\u003e\n"],["\u003cp\u003eMembership expiration is applicable to users, groups, and service accounts with a \u003ccode\u003eMEMBER\u003c/code\u003e role, and when applied to a group, it becomes the default for all child members unless they have individual expirations.\u003c/p\u003e\n"],["\u003cp\u003eUpdating a membership's expiration requires calling \u003ccode\u003egroups.memberships.modifyMembershipRoles()\u003c/code\u003e and specifying the \u003ccode\u003eMEMBER\u003c/code\u003e role and its new expiration date.\u003c/p\u003e\n"],["\u003cp\u003eRetrieving a membership expiration is done by calling \u003ccode\u003egroups.memberships.get()\u003c/code\u003e with the parent group ID and the membership ID.\u003c/p\u003e\n"],["\u003cp\u003eGroup owners are automatically notified via email 72 hours before a membership expires, or immediately if the expiration is sooner than 72 hours.\u003c/p\u003e\n"]]],[],null,["# Managing membership expirations\n===============================\n\nThis page explains how to update and retrieve expiration settings for group\nmemberships, and the expiration notifications group owners receive.\n| **Note:** This feature is only available to Google Workspace Enterprise Standard, Enterprise Plus, and Enterprise for Education, and Cloud Identity Premium accounts.\n\nMembership expiration allows group owners, group managers, Google Workspace\nSuper Admins, or Workspace Delegated Admins with group admin privileges to\nmanage groups and groups-based access to resources. Access can be limited based\non membership staleness or temporary need without manually removing members.\nThe Groups API enables membership expiration for the following use cases:\n\n- Time-limited access to resources (for example, to allow someone to help troubleshoot a problem in production)\n- Temporary membership in a communications group (for example, to briefly include a person into a team group on a long-term project)\n\nExpirations can be applied to all types of group members (including users,\ngroups, and service accounts) if they have a `MEMBER` role. When you set an\nexpiration for a member that is a group, that expiration becomes the default\nexpiration for all child members of that group unless the child member has a\ndirect membership in the parent group with an individual expiration already\napplied. The expiration also applies to all new members of the child group\ngoing forward.\n\nBefore you begin\n----------------\n\nSet up authentication and install the client libraries. See\n[Setting up the Cloud Identity Groups API](/identity/docs/how-to/setup) to\nlearn how.\n\nAdding a membership with expiration\n-----------------------------------\n\nSee\n[Managing Google Group memberships for Google Groups](/identity/docs/how-to/memberships-google-groups)\nor\n[Managing identity-mapped group memberships](/identity/docs/how-to/memberships-identity-groups)\nto learn how.\n\nUpdating the expiration of a membership\n---------------------------------------\n\nTo update the expiration of a membership, call\n[`groups.memberships.modifyMembershipRoles()`](/identity/docs/reference/rest/v1/groups.memberships/modifyMembershipRoles)\nwith the ID of the parent group, the ID of the membership, and an\n[`UpdateMembershipRolesParams`](/identity/docs/reference/rest/v1beta1/groups.memberships/modifyMembershipRoles#updatemembershiprolesparams)\nresource. Because members can have more than one [`MembershipRole`](/identity/docs/reference/rest/v1beta1/groups.memberships#MembershipRole)\nin a group, you must specify which role will have the expiration. Currently\nonly the `MEMBER` role may have an expiration applied to it.\n| **Note:** To get the ID of the membership, call [groups.memberships.lookup()](/identity/docs/reference/rest/v1beta1/groups.memberships/lookup) with the ID of the parent group and the `memberKey` of the member.\n\n**Sample request body** \n\n {\n \"updateRolesParams\": [\n {\n \"fieldMask\": \"expiry_detail.expire_time\",\n \"membershipRole\": {\n \"expiryDetail\": {\n \"expireTime\": \"2021-10-02T15:01:23Z\"\n },\n \"name\": \"MEMBER\"\n }\n }\n ]\n }\n\nRetrieving a membership expiration\n----------------------------------\n\nTo retrieve the membership expiration of a membership, call\n[`groups.memberships.get()`](/identity/docs/reference/rest/v1/groups.memberships/get)\nwith the ID of the parent group and the ID of the membership.\n| **Note:** To get the ID of the membership, call [`groups.memberships.lookup()`](/identity/docs/reference/rest/v1beta1/groups.memberships/lookup) with the ID of the parent group and the `memberKey` of the member.\n\nEmail notifications\n-------------------\n\nEmail notifications are automatically sent to all group owners when memberships\nare about to expire. Notifications are sent 72 hours before expiration or\nimmediately if the membership will expire before 72 hours when it is set.\nThe notifications are sent in each group owner's preferred language, as defined\nby the domain administrator in the Google Admin console or by the group owner\nindividually."]]