Hello Community,
I have a scenario where I am working with two Google Cloud projects:
Issue Description
I am encountering the following error when trying to report usage from Project B to Project A:
{ "error": "<HttpError 403 when requesting https://servicecontrol.googleapis.com/v1/services/compute.googleapis.com:report?alt=json returned \"Permission 'servicemanagement.services.report' denied for the consumer project (or it may not exist)\". Details: \"[{'@type': 'type.googleapis.com/google.rpc.ErrorInfo', 'reason': 'IAM_PERMISSION_DENIED', 'domain': 'iam.googleapis.com', 'metadata': {'permission': 'servicemanagement.services.report'}}]\">" }
Additionally, I have tried authenticating with a service account key from Project A, but I still face the same permission error.
I need help identifying why I am getting the IAM_PERMISSION_DENIED error despite the service account having the necessary roles. Any guidance or troubleshooting steps would be greatly appreciated!
Thank you!
Hello @harshada2828,
Thanks for sharing your setup details, issue description, and steps you’ve tried so far. Although I don’t have visibility on your projects’ exact configuration, here are additional steps I can recommend trying out:
servicemanagement.services.report
permission explicitly granted in Project A.You may also consider using a different authentication method. Since you mentioned your set up uses a Service Account key, there are more secure alternatives available that you may choose from based on your use case. If you prefer to continue using a Service Account key, refer to these Best Practices for more guidance.
Hope this helped!