Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Cloud Endpoint Error

Hi Team,
 
I deployed cloud endpoint on cloud run, and I stuck with below error. Can you please help me with the error or guide me how to resolve it.
 
INTERNAL: Calling Google Service Control API failed with: 403 and body: \bcPermission 'servicemanagement.services.check' denied for the consumer project (or it may not exist) \n(type.googleapis.com/google.rpc.ErrorInfo[\nIAM_PERMISSION_DENIEDiam.googleapis.com.\n\npermission servicemanagement.services.check
 
Thank you.
Solved Solved
0 1 384
1 ACCEPTED SOLUTION

Hi @SinghPavan,

Welcome to Google Cloud Community!

Permission servicemanagement.services.check denied for the consumer project indicates that there are some required services that are not enabled on the project or there are some required permissions needed to the service account.

To resolve this issue, you can try these solutions:

  1. Check if the required services such as Service Management API, Service Control API, Google Cloud Endpoints and your Endpoints service name are enabled and enable them if not.
  2. Grant the Service Management role to the service account:
    gcloud projects add-iam-policy-binding PROJECT_NAME \
          --member serviceAccount:SERVICE_ACCOUNT \
          --role roles/servicemanagement.admin
  3. Grant the Service Control role to the service account:
    gcloud projects add-iam-policy-binding PROJECT_NAME \
          --member serviceAccount:SERVICE_ACCOUNT \
          --role roles/servicemanagement.serviceController

You can visit Cloud Endpoints for Cloud Run for other information and Cloud Endpoints troubleshooting for troubleshooting overview.

I hope the above information is helpful.

View solution in original post

1 REPLY 1

Hi @SinghPavan,

Welcome to Google Cloud Community!

Permission servicemanagement.services.check denied for the consumer project indicates that there are some required services that are not enabled on the project or there are some required permissions needed to the service account.

To resolve this issue, you can try these solutions:

  1. Check if the required services such as Service Management API, Service Control API, Google Cloud Endpoints and your Endpoints service name are enabled and enable them if not.
  2. Grant the Service Management role to the service account:
    gcloud projects add-iam-policy-binding PROJECT_NAME \
          --member serviceAccount:SERVICE_ACCOUNT \
          --role roles/servicemanagement.admin
  3. Grant the Service Control role to the service account:
    gcloud projects add-iam-policy-binding PROJECT_NAME \
          --member serviceAccount:SERVICE_ACCOUNT \
          --role roles/servicemanagement.serviceController

You can visit Cloud Endpoints for Cloud Run for other information and Cloud Endpoints troubleshooting for troubleshooting overview.

I hope the above information is helpful.