Admin SDK Groups Settings サービスを使用すると、Apps Script で Admin SDK の Groups Settings API を使用できます。この API を使用すると、 Google Workspace ドメインの管理者(販売パートナー様を含む)は、 Google Workspace アカウント内のグループのグループ設定を管理できます。
リファレンス
このサービスの詳細については、Admin SDK Groups Settings API のリファレンス ドキュメントをご覧ください。Apps Script のすべての高度なサービスと同様に、Admin SDK Groups Settings サービスでは、公開 API と同じオブジェクト、メソッド、パラメータを使用します。詳細については、メソッド シグネチャの決定方法をご覧ください。
/** * Gets a group's settings and logs them to the console. */functiongetGroupSettings(){// TODO (developer) - Replace groupId value with yoursconstgroupId='exampleGroup@example.com';try{constgroup=AdminGroupsSettings.Groups.get(groupId);console.log(JSON.stringify(group,null,2));}catch(err){// TODO (developer)- Handle exception from the APIconsole.log('Failedwitherror%s',err.message);}}
/** * Updates group's settings. Here, the description is modified, but various * other settings can be changed in the same way. * @see https://developers.google.com/admin-sdk/groups-settings/v1/reference/groups/patch */functionupdateGroupSettings(){constgroupId='exampleGroup@example.com';try{constgroup=AdminGroupsSettings.newGroups();group.description='Newlychangedgroupdescription';AdminGroupsSettings.Groups.patch(group,groupId);}catch(err){// TODO (developer)- Handle exception from the APIconsole.log('Failedwitherror%s',err.message);}}
[[["わかりやすい","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-05-08 UTC。"],[[["The Admin SDK Groups Settings service enables Google Workspace administrators to manage group settings within their accounts using Apps Script and the Groups Settings API."],["This is an advanced service that requires enabling before use and mirrors the functionality of the public API."],["Comprehensive reference documentation, support resources, and sample code are available to guide developers in using this service effectively, including examples for retrieving and updating group settings."]]],[]]