Reputation: 15
Trying to query all users in the OU "LegacyMail" with the new Admin SDK for Apps Script, but it fails:
The example at developers.google.com shows that it should look like this:
"orgUnitPath": "corp/engineering",
function admsdk() {
var x = AdminDirectory.Users.list({
domain: "acamedomain.com",
query: "orgUnitPath:/acamedomain.com/LegacyMail"
});
Logger.log(x);
}
Upvotes: 1
Views: 2937
Reputation: 13528
Try:
function admsdk() {
var x = AdminDirectory.Users.list({
customer: "my_customer",
query: "orgUnitPath='/LegacyMail'"
});
Logger.log(x);
}
to explain:
Upvotes: 3