Admin SDK Groups Settings Service Stay organized with collections Save and categorize content based on your preferences.
Page Summary
The Admin SDK Groups Settings service in Apps Script allows Google Workspace administrators to manage group settings using the Admin SDK Groups Settings API.
This service is an advanced service that must be enabled before use.
The service uses the same objects, methods, and parameters as the public Admin SDK Groups Settings API.
Sample code is provided for getting and updating a group's settings.
The Admin SDK Groups Settings service allows you to use the Admin SDK'sGroups Settings API in Apps Script. This APIgives administrators of Google Workspace domains(including resellers) the ability to manage the group settings for groups intheir Google Workspace account.
Note: This is an advanced service that must beenabled before use.Reference
For detailed information on this service, see thereference documentation for theAdmin SDK Groups Settings API. Like all advanced services in Apps Script, theAdmin SDK Groups Settings service uses the same objects, methods, and parametersas the public API. For more information, seeHow method signatures are determined.
To report issues and find other support, see theAdmin SDK Groups Settings support guide.
Sample code
The sample code below usesversion 1of the API.
Get a group's settings
This sample gets a group's settings and logs them to the console.
/** * 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("Failed with error %s",err.message);}}
Update a group's settings
This sample shows how a group's settings can be changed. Here, the descriptionis 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="Newly changed group description";AdminGroupsSettings.Groups.patch(group,groupId);}catch(err){// TODO (developer)- Handle exception from the APIconsole.log("Failed with error %s",err.message);}}
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-11 UTC.