使用Admin SDK通过Apps脚本更新组设置

时间:2014-12-01 12:59:18

标签: google-apps-script google-admin-sdk

保持简单 - 我正在使用Google Apps脚本管理SDK目录服务来批量创建群组:

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

在此之后,我一直在尝试使用以下内容更新组权限:

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");

我得出结论,我真正需要的是访问Group Settings API。我可以使用Apps脚本执行此操作吗?

1 个答案:

答案 0 :(得分:0)

是的,如果您无法从Googles built in servicesAdvanced services找到所需内容,则可以随时通过网址抓取服务访问任何其他可访问的API:https://developers.google.com/apps-script/guides/services/external