Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DialogFlow PermissionDenied: 403 IAM permission 'dialogflow.sessions.detectIntent'

PermissionDenied: 403 IAM permission 'dialogflow.sessions.detectIntent' on 'projects/XXXX-live/agent' denied.

I have used the DialogFlow client as a role while creating the service.

What could be the problem?

like image 879
Anand Thati Avatar asked Jul 19 '18 11:07

Anand Thati


2 Answers

When I was playing around with permissions with service accounts, I also encountered the same problem. I created a completely new service account and then gave it the client role, and it worked for some unknown reason. I would suggest trying to create another account and then giving it the client role and seeing if it works for that account. Also, this isn't necessarily a kosher fix per say, but if you give the account the admin role, then your problem will also be solved.

Edit: At first I thought it might have to do with how the service accounts were created (cloud console vs. command-line), but it seems that's not the case. For some reason it's just the first service account that you create that a client role doesn't work for.

like image 134
LiminalKryosis Avatar answered Nov 18 '22 22:11

LiminalKryosis


I faced the same issue while integrating Dialogflow with external client.

The root cause for my case was that even though I created the service account for my external client, I forgot to add the service account and give "Dialogflow API Admin' Role.

How I resolve: In GCP project, go to IAM > click the top "+ADD" button and search for the service account that you want to grant permission access, choose role type "Dialogflow API Admin"

like image 37
unacorn Avatar answered Nov 18 '22 23:11

unacorn