From dc90fb9c94fc495ee81197ea757cf27502a994ea Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Sat, 26 Sep 2020 07:16:08 -0700 Subject: [PATCH] Update to new DwD page (#1253) --- src/gam/__init__.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gam/__init__.py b/src/gam/__init__.py index fb593fb2..365c1e5d 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -1235,15 +1235,17 @@ def doCheckServiceAccount(users): check_scopes.append(USERINFO_EMAIL_SCOPE) long_url = ('https://admin.google.com/ac/owl/domainwidedelegation' f'?clientScopeToAdd={",".join(check_scopes)}' - f'&clientIdToAdd={service_account}') + f'&clientIdToAdd={service_account}&overwriteClientId=true') short_url = utils.shorten_url(long_url) scopes_failed = f'''Some scopes failed! To authorize them, please go to: {short_url} -You will be redirected to the G Suite admin console. The Client Name and API -Scopes fields will be pre-populated. Please click Authorize to allow these -scopes access. After authorizing it may take some time for this test to pass so +You will be directed to the G Suite admin console Security/API Controls/Domain-wide Delegation page +The "Add a new Client ID" box will open +Make sure that "Overwrite existing client ID" is checked +Please click Authorize to allow these scopes access. +After authorizing it may take some time for this test to pass so go grab a cup of coffee and then try this command again. ''' controlflow.system_error_exit(1, scopes_failed)