How to impersonate an admin user when using getClient() in the Google API NodeJS client
问题 Per the recommendation in the defaultauth sample, I am trying to access the directory api for a domain which I have created a service account for. Here is the code I am attempting to connect with: import { google } from 'googleapis' const authClient = await google.auth.getClient({ scopes: ['https://www.googleapis.com/auth/admin.directory.user.readonly'] }) const service = google.admin('directory_v1') console.log( await service.users.list({ auth: authClient, domain: <redacted> }) ) However,