enter image description hereDrive.Drives.List this method only retrived 10 shared Drive List and not able to retrieve all the Drive List in google apps script.
Please find my below code for your reference.
I need list of drive id and list of drive name but I am getting only 10 drive id and name not all the list.
function driveList()
{
const sharedDrive = Drive.Drives.list().items
.map(drive => ({id:drive.id,name:drive.name}));
drivedata=JSON.stringify(sharedDrive);
driveList=JSON.parse(drivedata);
for(var i=0;i<driveList.length;i++)
{
Logger.log(driveList[i].id);
Logger.log(driveList[i].name);
}
}