Search code examples
google-apps-scriptgoogle-cloud-platformgoogle-apigoogle-oauth

Remove two unnecessary permissions in the consent screen


We are submitting an add-on for Google Sheets, the add-on is not in the marketplace yet. The follows is the current APIs & Services of the add-on. All the APIs and Services are not necessary.

BigQuery API                    
BigQuery Storage API                    
Cloud Datastore API                 
Cloud Logging API                   
Cloud Monitoring API                    
Cloud SQL                   
Cloud Storage                   
Cloud Storage API                   
Cloud Trace API                 
Google Cloud APIs                   
Google Cloud Storage JSON API                   
Google Workspace Marketplace SDK                    
Service Management API                  
Service Usage API

We run the add-on in the test mode to make the demo video of OAuth verification, here is the consent screen:

enter image description here

"See, edit, create, and delete all your Google Sheets spreadsheets" and "Display and run third-party web content in prompts and sidebars inside Google applications" are necessary for the add-in. However, "See, edit, create, and delete all your Google Docs documents" and "View and manage your forms in Google Drive" are unnecessary.

Does anyone know how to remove the two unnecessary permissions?

PS: The scopes we are requesting at the moment:

enter image description here


Solution

  • You seem to be a little confused. The images you have shown from Google cloud console only show the scopes you intend to use to the verification team. They have nothing to do with what is shown in the OAuth consent screen.

    The scopes shown in the OAuth consent screen come directly from your code. You have added scopes to your code these are the scopes that are displayed to the user.

    If you want to remove one or more you need to check your code and remove them there.

    You probably have these two in your code some where. Remove them.

    They seam to be part of the Apps Script API, v1 scopes so i would check your app script project to see if you don't have some extra permissions requested.