Delegation denied error for Google Apps Script

39 views
Skip to first unread message

Paul Heft

unread,
Sep 30, 2022, 11:15:28 PMSep 30
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 AMOct 1
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 PMOct 1
to Google Apps Script Community
Reply all
Reply to author
Forward
0 new messages