Delegation denied error for Google Apps Script

291 views
Skip to first unread message

Paul Heft

unread,
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 ad...@domain.org

Have I left out something?

Please refer to my detailed document.

Thanks!


Andrew Roberts

unread,
Oct 1, 2022, 5:42:33 AM10/1/22
to google-apps-sc...@googlegroups.com
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 google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/cfb1eaae-6cb2-4b65-b44d-1b7e2755a1f1n%40googlegroups.com.

Paul Heft

unread,
Oct 1, 2022, 6:17:51 PM10/1/22
to Google Apps Script Community

Pelagia Drakopoulou

unread,
Oct 21, 2023, 5:52:32 PM10/21/23
to Google Apps Script Community
I have come across the exact same problem. Is there a chance that you have fixed it? 
Reply all
Reply to author
Forward
0 new messages