I'm attempting to output information on all shared drives in a domain with the snippet below. However, the only properties that are populating are id and name. What am I doing wrong?
function listSharedDrives()
{
Logger.log("Getting Shared Drives");
var pageToken;
var page;
do {
page = Drive.Drives.list({
pageToken:pageToken,
maxResults: 100,
orderBy: 'name',
useDomainAdminAccess:true,
supportsAllDrives:true
});
var drives = page.items;
if (drives) {
for (var i = 0; i < drives.length; i++) {
var drive = drives[i];
var color = drive.colorRgb;
var createdDate = drive.createdDate;
var capabilities = drive.capabilities;
var hidden = drive.hidden;
var orgUnitId = drive.orgUnitId;
var restrictions = drive.restrictions;
var themeId = drive.themeId;var permissions = Drive.Permissions.list(driveID, {useDomainAdminAccess:true, supportsAllDrives:true}).items;
}
}
pageToken = page.nextPageToken;
} while (pageToken);
}