尝试使用新的Apps SDK for Apps脚本查询OU“LegacyMail”中的所有用户,但它失败了:
developers.google.com上的示例显示它应如下所示:
"orgUnitPath": "corp/engineering",
function admsdk() {
var x = AdminDirectory.Users.list({
domain: "acamedomain.com",
query: "orgUnitPath:/acamedomain.com/LegacyMail"
});
Logger.log(x);
}
答案 0 :(得分:2)
尝试:
function admsdk() {
var x = AdminDirectory.Users.list({
customer: "my_customer",
query: "orgUnitPath='/LegacyMail'"
});
Logger.log(x);
}
解释: