使用管理员帐户/弃用的GroupsManager类获取组成员 [英] Get group members with an admin account / deprecated GroupsManager class
问题描述
GroupsManager类将于2014年11月20日之前关闭 https: //developers.google.com/apps-script/reference/domain/groups-manager
The class GroupsManager will be turned off by November 20, 2014 https://developers.google.com/apps-script/reference/domain/groups-manager
我使用这个班级来管理我的管理员帐户,因为它允许访问群组成员无成员。
I am using this class to manage some groups with my admin account as it's allowing access to group members WITHOUT BEING MEMBER OF.
示例代码在这里:
var group = GroupsManager.getGroup("some-group-name@mydomain.com");
var members = group.getAllMembers();
使用网上论坛服务 https://developers.google.com/apps-script/reference/groups/ 不是一个选项,正如文档中所述:此服务允许脚本来访问Google网上论坛,它可以用来查询诸如组的电子邮件地址等信息,或者用户是的成员列表。
Using the Groups Service https://developers.google.com/apps-script/reference/groups/ is not an option, as stated in the documentation: "This service allows scripts to access Google Groups. It can be used to query information such as a group's email address, or the list of groups in WHICH THE USER IS MEMBER OF."
使用GroupsManager中提出的 AdminSDK 要管理您的域,请改用Admin SDK Directory和Admin SDK Reports高级服务。既不是没有方法检索组的成员
Using the AdminSDK as proposed in the GroupsManager "To manage your domain, use the Admin SDK Directory and Admin SDK Reports advanced services instead." is neither an option as there is no method to retrieve the members of a group...
所以,任何人都有线索?
So, anyone has a clue?
谢谢您,
Franck
Thank you, Franck
推荐答案
您可以使用Admin SDK目录服务来执行此操作。方法 AdminDirectory.Members.list
列出了一个组的所有成员。
You can use the Admin SDK Directory service to do this. The method AdminDirectory.Members.list
lists all the members of a group.
这篇关于使用管理员帐户/弃用的GroupsManager类获取组成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!