ODBC guide

Read files from group or other user's drive


Gets files from a group or another user's drive. Use SearchType='children' (recursive may not work in all cases). Supply GroupOrUserId, DriveId, and SearchPath.

SELECT * FROM list_files
WITH(
	  GroupOrUserId='/groups/138eb458-84f0-4928-bbe6-df663bd1fcea'
	, DriveId='me'
  --OR-- Use Shared Drive Id or other User's Drive Id
  --,DriveId='b!GtLN726LE0eXXXXXXXXXXXX'
  
	, SearchType='children'
	, SearchPath='/root:/folder/subfolder:'
  --, Filter='$.value[*]' --list both files and folders
  --, Filter='$.value[?(@.folder.childCount != null)]' --list only folders
)