In Dialogflow reason for error message: "Permission 'cloudfunctions.functions.setIamPolicy' denied on resource dialogflowFirebaseFulfillment

Viewed 1868

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 Answers

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.

Solved After setting Project Owner role, no error.

Thanks

Related