6

I was trying webhook to send email in chatbot (dialogflow). Getting following error (log entry) . What may be the reson?

message: "Permission 'cloudfunctions.functions.setIamPolicy' denied on resource 'projects/rare-shadow-276706/locations/us-central1/functions/dialogflowFirebaseFulfillment' (or resource may not exist)."

2 Answers2

4

The issue

This is an issue with the proper permissions, and the service account permissions. What's happening is the dialogflowFirebaseFunction needs to have the setIamPolict role.

The fix

You can achieve this when you (the user) have the roles/iam.securityAdmin role. Check this out for more info. Other roles may also work, but this role will suffice. I would suggest also deleting the existing cloud function, get the new role, and then create the cloud function again.

Ari
  • 156
  • 5
1

Solved After setting Project Owner role, no error.

Thanks

  • 1
    my pleasure @Radhakrishna. GCP service accounts can get pretty confusing with respect to access control and authentication. Owning your projects eliminates many of these nuanced issues. – Ari Jul 01 '20 at 15:43