Thanks, Ross, for the call.
For anyone following this, the solution is to add showdrivename to the end of the command. This will show the Shared Drive Name.
gam user
orga...@domain.com print filelist corpora onlyshareddrives query "name = '
<Name of Folder>'" fields id,name,driveid
showdrivename
Alternatively, if you add filepath then you get to see the full folder path.
gam user
orga...@domain.com print filelist corpora onlyshareddrives query "name = 'Put Name Here'" fields id,name,driveid
filepath
Add todrive to the end of the command to view the results in a Google Sheet.
Add excludetrashed, to prevent folders in the Bin being listed.
NB you may find that the number displayed in the output line is different to the final results. For example, the number 37 may be larger than the final results. This is because the number 37 refers to all the folders called <Name of Folder> (both in your My Drive and Shared Drives). GAMADV-XTD3 then filters out the folders from your My Drive.
Got 37 Drive Files/Folders that matched query ((name = '<Name of Folder>')) for <User Email Address>...