At the beginning of 2026 Google started to roll out granular OAuth consent for Workspace Add-ons with the view that it would improve the choice for end users when selecting permissions to run automated script. Unfortunately as end users are not typically aware of the inner workings of Google Apps Script (why would they?) the result is that sometimes they do not select all of the necessary permissions for an Add-on to function correctly when installing.
This leads to additional work for developers to handle enquiries and provide resources/instruction to overcome the issue. It can also result in reduced installations of an Add-on or negative feedback about it not working.
The good news is that there is a little bit of additional code we can add to the very beginning (and not inside of any try/catch) that will re-prompt the user if they have not selected to allow all of the permissions (scopes). Note that in this example I am assuming as a developer you are requesting the minimum scopes necessary and that you require them all:
This will help to ensure your Add-on continues to run smoothly going forwards.
No comments:
Post a Comment