Hello Community,
I have a scenario where I am working with two Google Cloud projects:
- Project A: Contains Service Control API and some private APIs.
- Project B: Hosts a Cloud Run service with an application that uses Service Control API’s Check and Report methods.
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'}}]\">"
}
Setup Details
- Cloud Run Service in Project B calls Project A’s APIs to check VM status and report VM usage to Service Control.
- Service account used by Cloud Run has the following roles assigned in both projects:
- Service Controller
- Service Reporter
- Editor
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!
