Closed jroakes closed 1 year ago
Leaving an update here for others:
Error was present with:
google-auth 1.35.0
google-api-core 1.34.0
Resolution:
installed google-api-core-2.11.0 google-auth-2.16.0
credentials = service_account.Credentials.from_service_account_file(SERVICE_ACCOUNT_CREDENTIALS, subject=SERVICE_ACCOUNT_SUBJECT)
to
SCOPES = ['https://www.googleapis.com/auth/analytics.readonly']
credentials = service_account.Credentials.from_service_account_file(SERVICE_ACCOUNT_CREDENTIALS,
scopes=SCOPES,
subject=SERVICE_ACCOUNT_SUBJECT)
step 1 seemed to be the main issue. received error even after updating step 2.
Running: pip install -U google-api-core[grpc]
solved the error.
Thanks for providing an update. I'm glad that the issue is resolved. I'm going to close this issue but please feel free to open a new issue if you have additional questions or encounter issues.
Hey @parthea this is going to reappear because the dependency is not set correctly.
If it's google-api-core 1.34.0 causing the problem, that dependency will need to be reviewed to fix this.
Environment details
google-analytics-data
version: Version: 0.16.1Steps to reproduce
Domain-wide Delegation Scopes
Code example
Stack trace
I am unable to provide delegated access to properties using the same subject delegation that works in the GA3 API. I have searched to see if there is another scope for delegation in our Workspace account relative to this beta version. It is my understanding that
https://www.googleapis.com/auth/analytics.readonly
should provide this. We use a centralized Google Workspace email as a user on multiple GA4 properties to make reporting more efficient. Currently, we can't figure out how to unblock these permission denied errors using subject delgation, using code provided as example.