How to stop all installable triggers of the add-on if the user removed permissions for the add-on in the page Apps with access to your account?
For standalone scripts, the user will receive a "Summary of failures for Google Apps Script" email. But for the add-on developer, the add-on will just keep throwing the error "The script does not have permission to get the active user's identity." in Stackdriver Logging.
Notice that this case is different from uninstalling or disabling the add-on, as it would be possible to stop the trigger by testing the authMode of the event object. Example:
function onEditCustom(e) {
if(e.authMode != ScriptApp.AuthMode.FULL) return;
// code...
}
There are two outcomes for installable triggers if the user (creator of the trigger) remove permission for the script:
The owner of the trigger will receive an email from apps-scripts-notifications@google.com
listing exceptions thrown by the script, and in the case of no permission, the message is: "Authorization is required to perform that action."
As commented in the question, "With no permission to do anything, no code can run.".
In addition to the comment, Google Apps Script documentation on Installable Triggers - Limitations, "Add-ons do not automatically send the user an email when code run by an installable trigger throws an exception. It is up to the developer to check for and handle failure cases gracefully."