How to get nicknames from a Google group via API? -
how can nickname grouping via google apps script?
this doesn't seem work:
var groups = groupsmanager.getallgroups(); (var in groups) { var grouping = groups[i]; var nicknames = nicknamemanager.getallnicknames(group.getname());
edit : i realize misunderstood question, i'll leave there in case in might of interrest doesn't reply real question nicknames of grouping itself... sorry
the argument needed in getallnicknames(string username)
not grouping name user name in group. (use control+space see autocomplete)
try code see users , nicknames (i limited execution 10 because have lot of groups in domain , took sooooo long ;-)
function myfunction() { var groups = groupsmanager.getallgroups(); (var in groups) { if(i>10){break} var groupname = groups[i].getname() var groupusers = groups[i].getallmembers() for(var u in groupusers){ logger.log('groupname : '+groupname+' = '+groupusers[u]) } } var nicknames = nicknamemanager.getallnicknames() for(n in nicknames){ logger.log('user '+nicknames[n].getusername()+' has nickname = '+nicknames[n].getnickname()) } }
google-apps-script
No comments:
Post a Comment