GAE AttributeError: 'Credentials' object has no attribute 'with_subject'
I have a python app I want to deploy on App Engine (2nd Generation Python 3.7) on which I use a Service Account with Domain-wide delegation enabled to access user data. Locally I do: import google.auth from apiclient.discovery import build creds, project = google.auth.default( scopes=['https://www.googleapis.com/auth/admin.directory.user', ], ) creds = creds.with_subject(GSUITE_ADMIN_USER) service = build('admin', 'directory_v1', credentials=creds) This works good and, as far as I know it is the current way to do this when using Application Default Credentials (locally I have GOOGLE