Stay organized with collections
Save and categorize content based on your preferences.
The Admin SDK Groups Settings service allows you to use the Admin SDK's
Groups Settings API in Apps Script. This API
gives administrators of Google Workspace domains
(including resellers) the ability to manage the group settings for groups in
their Google Workspace account.
Reference
For detailed information on this service, see the
reference documentation for the
Admin SDK Groups Settings API. Like all advanced services in Apps Script, the
Admin SDK Groups Settings service uses the same objects, methods, and parameters
as the public API. For more information, see How method signatures are determined.
/** * 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);}}
Update a group's settings
This sample shows how a group's settings can be changed. Here, the description
is modified, but various other settings can be changed in the same way.
/** * 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);}}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-12-19 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."]]],[]]