Granting Additional Permissions for Google Service Accounts
-
Go to the Google Workspace Admin Console: admin.google.com.
-
Navigate to Security > Access and Data Control > API Controls > Domain-wide Delegation.
-
Select Add New.
-
Client id: from the service account in GCP copy the client id
-
Auth scope: fill in the list from the next step
-
-
Select the relevant service account.
-
Select Edit, and add the following scopes:
https://www.googleapis.com/auth/cloudplatformorganizations.readonly,
https://www.googleapis.com/auth/admin.directory.customer.readonly,
https://www.googleapis.com/auth/admin.directory.domain.readonly,
https://www.googleapis.com/auth/admin.directory.group.member.readonly,
https://www.googleapis.com/auth/admin.directory.group.readonly,
https://www.googleapis.com/auth/admin.directory.notifications,
https://www.googleapis.com/auth/admin.directory.orgunit.readonly,
https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly,
https://www.googleapis.com/auth/admin.directory.user.readonly,
https://www.googleapis.com/auth/admin.directory.userschema.readonly,
https://www.googleapis.com/auth/admin.reports.audit.readonly,
https://www.googleapis.com/auth/cloud-platform.read-only