Use the new Google Cloud Identity API to manage your Google Groups on your G Suite domain. Find in this article some REST and Apps Script code to query the Cloud Identity API.
Stéphane Giron summaries some helpful Google Apps Script code for interacting with the Google Cloud Identity API via REST. In this post you’ll find functions for listing both Google Groups in your domain and the members of each of those groups.
Source: Use the Google Cloud Identity API for Google Groups
Member of Google Developers Experts Program for Google Workspace (Google Apps Script) and interested in supporting Google Workspace Devs.