Regarding insertion of a member to a DL via script

Skip to first unread message

Sumitav Acharya

Jan 25, 2022, 2:42:01 PM1/25/22
to Google Apps Script Community
Hello all,
I am trying to insert a member to a group/DL via App Script using AdminDirectory API but looks like AdminDirectory is only available to administrators of GSsuite accounts. as the documentation specifies.
So can anyone please help me with the same?

I am struggling for so many days to find "How to insert a member to a group given that you are the manager of that DL via script" but I am not getting any solution.
I would be really grateful if someone can help me out to achieve the same.


Clark Lind

Jan 26, 2022, 9:08:12 AM1/26/22
to Google Apps Script Community
You cannot add members to groups unless you are an Admin of a domain. Otherwise, anyone could add anyone else to any group they wish against their will. So no, normal users cannot do this.

Nick Bergstrom

Jan 27, 2022, 7:45:11 PM1/27/22
to Google Apps Script Community
I've looked into this recently and also confirmed adding group members can only be done by Admins via the Directory API.

The GroupsApp class ( gives you read-only access to view members in groups, depending on group permissions. It doesn't have any functions to add or remove members.

If a group has "Member moderation > Who can manage members is set to Group managers" set to Group Managers, any manager can already manage the members via the Groups site, so I wish Google could use the same security settings to allow that for authorized managers via GroupsApp.

Sumitav Acharya

Jan 29, 2022, 7:35:57 AM1/29/22
to Google Apps Script Community

Can I have some other approach of insertion then? using any other API or google contacts?

Reply all
Reply to author
0 new messages