2

Im using SDK Admin API to create users, aliases and groups.

I would like to add current and future users to any group like Google does in his admin but i cant see any endpoint to do this in his API.

Do you know if it is possible?

Thanks

enter image description here

Edit: To do it in admin console

Go to groups -> click on "Add members" in one group

In the modal -> click on "Advanced" and mark checkbox "Add all current and future users of "domain name" to this group with All Email setting"

Lorraine
  • 441
  • 5
  • 23
  • If I understand you correctly, you are looking for a way to automatically add any created user to a Group via API? Can you reference how to do this in the Admin console? Why don't you just code your application this way? (after creating the user, add them to the desired group). – Iamblichus Dec 16 '20 at 13:38
  • Thanks for your response. I update the question. If i do this without API, how i know wich group has this feature to add the new created user only to groups that has "all current and future users" enabled? I cant see any property in groups that i have checked it in admin console. – Lorraine Dec 16 '20 at 17:13

1 Answers1

2

Answer:

This is currently not possible via API.

Explanation:

There's no way, neither through Directory API nor via Groups Settings API, to automatically add any created user to a Group.

File a Feature Request:

I'd suggest you to file a Feature Request in Issue Tracker here in order to request this functionality.

Workaround:

If you're creating Users via API, I'd just code my application so that, right after creating any user, this user is added to the desired Groups via members.insert.

Iamblichus
  • 18,540
  • 2
  • 11
  • 27