Delegation denied error for Google Apps Script

Skip to first unread message

Paul Heft

Sep 30, 2022, 11:15:28 PM9/30/22
to Google Apps Script Community

I am designing a Google Apps Script for domain-wide delegation, so that it can read details from Gmail in our Google Workspace domain's user accounts. The script runs fine when it accesses my own Gmail, but fails with a "Delegation denied" error when accessing another user's account.

GoogleJsonResponseException: API call to gmail.users.labels.list failed with error: Delegation denied for

Have I left out something?

Please refer to my detailed document.


Andrew Roberts

Oct 1, 2022, 5:42:33 AM10/1/22
Have you enabled domain wide delegation in the admin panel?

You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Paul Heft

Oct 1, 2022, 6:17:51 PM10/1/22
to Google Apps Script Community
Reply all
Reply to author
0 new messages