Using Admin SDK to update group settings with Apps Script

旧时模样 提交于 2019-12-11 11:52:15

问题


Keeping it simple - I'm using Google Apps Script Admin SDK Directory Service to bulk create groups:

AdminDirectory.Groups.insert({"email": group1@test.test});

Following this I have been attempting to update the groups permissions using the following:

AdminDirectory.Groups.update({
                             "whoCanJoin": "CAN_REQUEST_TO_JOIN",
                             "whoCanViewMembership": "ALL_IN_DOMAIN_CAN_VIEW",
                             "whoCanViewGroup": "ALL_IN_DOMAIN_CAN_VIEW",
                             "whoCanInvite": "ALL_MANAGERS_CAN_INVITE",
                             "allowExternalMembers": "false",
                             "whoCanPostMessage": "ALL_IN_DOMAIN_CAN_POST",
                             "allowWebPosting": "true"
                             },
                             "group1@test.test");

I've come to the conclusion that what I really need is access to the Group Settings API. Can I do this with Apps Script?


回答1:


Yes, if you can't find what you want from Googles built in services, or the Advanced services, you can always access any other accessible API via the URL fetch service: https://developers.google.com/apps-script/guides/services/external



来源:https://stackoverflow.com/questions/27228945/using-admin-sdk-to-update-group-settings-with-apps-script

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!