The error message “Error getting access token for service account: 401 Unauthorized” is generated when the API permissions are insufficient. You may find it in the discovery log or when testing the Google Workspace credential.
Ensure that the following API scopes are set up for vScope in Google Workplace. These are set up in step 5d of the Add Google Workspace to vScope instructions.
https://www.googleapis.com/auth/admin.directory.user.readonly,
https://www.googleapis.com/auth/admin.directory.group.readonly,
https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly,
https://www.googleapis.com/auth/admin.directory.orgunit.readonly,
https://www.googleapis.com/auth/admin.directory.user.security,
https://www.googleapis.com/auth/admin.directory.device.mobile.readonly