Google Picker after drive.readonly goes restricted

210 views
Skip to first unread message

Brett Grear

unread,
May 14, 2021, 10:44:48 AM5/14/21
to Google Apps Script Community
Dear all,

Does anyone know how the Google Picker, and subsequently, the ability to read all files within a folder selected by a user, will work once the Drive.readonly scope is moved to restricted in 2021.

Does anyone have any plans for how to update add-ons to not use this scope?  I can't afford paying thousands for external verification for a free add-on.

Kind regards,

Alan Wells

unread,
May 14, 2021, 10:55:08 AM5/14/21
to Google Apps Script Community
Myself and probably others have switched to using the Advanced Drive Service together with the:


scope.  If my add-on needs access to a specific file or folder, then the user needs to choose that file/folder with the Google Picker.
The Google Picker seems to show all the folders/files.
I'm not sure if the scope used has any affect on how the Google Picker works.

Brett Grear

unread,
May 14, 2021, 11:00:21 AM5/14/21
to Google Apps Script Community
I use "https://www.googleapis.com/auth/drive.file" with the Advanced Drive service as much as possible as well.
If the user chooses a folder, does this allow the add-on to read the files contained within that folder or only the folder itself?
I have always figured that it would only allow access for the folder itself.

Alan Wells

unread,
May 14, 2021, 12:11:52 PM5/14/21
to Google Apps Script Community
Even if a user picks a folder with the Picker, the add-on can't read files that have not been created by the add-on.
What it does allow is to determine whether the folder exists, and creating new files in that folder.
In other words, picking the folder gives the add-on write access to that folder, but not read access to files that were not created by the add-on.
If your add-on needs to list/search for files that the add-on has not created, then I don't know if there is an alternative for you.
The only possible solutions that I can think of are:
  • Open source the code and provide instructions to users about how to install
  • OR provide a template file with a bound script.
    • The user copies your template file
    • The user runs the code from their account
  • OR have the user create a Web App on their account that your add-on can interact with
  • Win the lottery pay - pay the security assessment fee.
The first 3 of those possible solutions require the user to do set-up which they may or may not be willing or able to do.

Brett Grear

unread,
May 17, 2021, 3:22:58 AM5/17/21
to Google Apps Script Community
Yeh! I was afraid of that. Thanks! I'll have to look at updating a couple of my add-ons to make them less user friendly but compliant.
Reply all
Reply to author
Forward
0 new messages