I'm trying to retrieve all Google Drive files that where created by users within my organisation (Domain-wide delegation and the drive role are set).
srv.Files.List().Corpora("domain").Fields("*").Q(modifiedTime).PageSize(1000).Pages(d.ctx, listFiles)
Although, the result of such call, only returns the files that have the "People in [COMPANY] can search for this file" in the share settings, toggled.
If I impersonate a different user and change the Corpora("domain")
to Corpora("user")
I can list all files, but that's not optimal if I have thousands of users.
How can I list all files under my organisation, including those that are not shared?