Duet AI setup

When following the guide to activate Duet AI (https://cloud.google.com/duet-ai/docs/discover/set-up-duet-ai), I am stuck on the point where one is supposed to run this command: 

gcloud services enable cloudaicompanion.googleapis.com

Even though I was granted access to Duet, and to my specific project, I still get this error:

PERMISSION_DENIED: Permission denied to enable service [cloudaicompanion.googleapis.com]
Help Token: AVzH8v2wwhM-hNvfR5VDFHY-ZAI0mp4K3o9VdbsbtP5FRPvoV7ACoZjMcTAT8h_YU4_IVxA-liBIol8Yr06-BVaRnmJTo5Y3Rup0PcBClYsibIhz
- '@type': type.googleapis.com/google.rpc.PreconditionFailure
violations:
- subject: ?error_code=110002&service=servicemanagement.googleapis.com&permission=servicemanagement.services.bind&resource=*My project*
type: googleapis.com
- '@type': type.googleapis.com/google.rpc.ErrorInfo
domain: serviceusage.googleapis.com

Does anyone know how to proceed?

Solved Solved
4 22 3,498
1 ACCEPTED SOLUTION

The error message you're encountering, "PERMISSION_DENIED: Permission denied to enable service [cloudaicompanion.googleapis.com]," indicates that you don't have the necessary permissions to enable the "cloudaicompanion.googleapis.com" service in your Google Cloud project. The error message also specifies the specific permission and resource that are causing the issue.

Make sure you have the required Identity and Access Management (IAM) permissions to enable the service.

a. Navigate to the Google Cloud Console.

b. Open the project where you are trying to enable the service.

c. Go to "IAM & Admin" and then select "IAM."

d. Check if you have the "Service Usage Admin" role or a similar role that grants permission to enable services. If not, you'll need to be granted this role or ask an administrator to grant it to you.

If you don't have the required permissions, you need to request the necessary permissions from your Google Cloud project's administrators. You can explain the specific service you are trying to enable and why you need it.

Make sure that you also have the appropriate access to Duet AI and that you are accessing the correct project and environment associated with Duet AI. It's possible that you may have access to Google Cloud but not to Duet AI.

View solution in original post

22 REPLIES 22

The error message you're encountering, "PERMISSION_DENIED: Permission denied to enable service [cloudaicompanion.googleapis.com]," indicates that you don't have the necessary permissions to enable the "cloudaicompanion.googleapis.com" service in your Google Cloud project. The error message also specifies the specific permission and resource that are causing the issue.

Make sure you have the required Identity and Access Management (IAM) permissions to enable the service.

a. Navigate to the Google Cloud Console.

b. Open the project where you are trying to enable the service.

c. Go to "IAM & Admin" and then select "IAM."

d. Check if you have the "Service Usage Admin" role or a similar role that grants permission to enable services. If not, you'll need to be granted this role or ask an administrator to grant it to you.

If you don't have the required permissions, you need to request the necessary permissions from your Google Cloud project's administrators. You can explain the specific service you are trying to enable and why you need it.

Make sure that you also have the appropriate access to Duet AI and that you are accessing the correct project and environment associated with Duet AI. It's possible that you may have access to Google Cloud but not to Duet AI.

We have all done this. Please file an internal ticket to fix this. 

I second this: this is clearly a bug in google's system

Hello,

You can only enable this api after you have been approved for the preview & have successfully allowlisted the project. Have you received the email stating you have been approved.If yes, pls use the link in the email to allowlist your project

Thanks!

Being approved and following the link is EXACLY what I did, as also then following the instructions in this page about granting access, and still the same problem

This thing is a nightmare to setup: no wonder everyone is using chatgpt. There you fill in a form, generate an api key, and that's it

We have all done this. There is something seriously wrong in the provisioning flow if so many people have this issue. Please file an internal ticket.

I have both been approved for the preview, allowlisted the project, and granted myself the specified roles. Still the error persists:/

I have the same issue - cannot activate the service.

I have been granted access for preview and also have the required roles/permissions.

Exactly the same issue here. And zero help from anyone at Google. Complete nightmare, this is so frustrating, back to Copilot/AWS it is...

One week and still no response from Google...sure they want to compete with OpenAI? 

Same issue here, granted all the roles and permissions, and i get this answer at every try : 

Permission denied to enable service [cloudaicompanion.googleapis.com]


Forget it. It's bricked. No one from Google cares to even answer. 

I am having the same issue. Signed up, got approved for my account, even signed up for basic support because I'm unable to move past this. 

I've ensured my user has the Cloud AI Companion User and Service Usage Viewer roles. 

Paid support seemed to be thinking there was a difference between "gcloud services enable cloudaicompanion.googleapis.com" and "gcloud services enable cloudaicompanion.google.com --project=<current project>" which really shows a lack of understanding

I thought the paid support would at least be able to decode the "Help Token" but it seems like not


Yes it’s really unusable and no one from Google cares, not even paid
support. RIP.

I also encountered a similar problem.
By the way, before I encountered this problem,
I was instructed to send the project number.
It looks like you can opt out on the screen below.
I'll try again to consider the possibility that I entered the number incorrectly.

”You can leave the waitlist for the Program by clicking here. We will remove your information from the waitlist and will not contact you further for follow up.”

(Try Duet AI in Google Cloud, https://cloud.google.com/earlyaccess/duet-ai?hl=en )

kaitom03_1-1700715466285.png

 

 

I finally got mine resolved; I had to sign up for basic support, and had a few passes with the L1 support (who, similar to this thread, were insisting I wasn't following the instructions properly) but they made an internal ticket and escalated it to a product specialist, and less than 24 hours later I was up and running. This unfortunately doesn't help anyone else, but I did want to share what worked for me. 

Ideal? No. But some of us just want to get on with our lives... and Duet, so far, seems pretty good. Too bad they haven't smoothed out the new user onboarding experience. 

Is it better than the alternatives/does it make it worthwhile to pay for
basic support and go through this back and forth to get it up and running?
Thoughts appreciated!

Depends on your personal financial situation - $29 as a minimum floor for basic support to me is 1/2 the price of a AAA video entertainment software*, at least in the USA, and I'm sure you can cancel it after they get you fixed. 

(g to the a to the m to the e is a banned word in this community? I'm literally using this to build a ... software with the primary purpose of entertainment)

I'm doing this for professional reasons - if it was purely personal I'd probably have given up. 

Thanks, that makes sense. I’m primarily on AWS and using their excellent
CodeWhisperer but since I’m also using a bunch of Google APIs I thought why
not give DuetAI a whirl and maybe switch to GCP. I’m a bit flabbergasted at
how bad the GCP support is...

solved.I unsubscribed and re-subscribed.

I used the same form I used last time,

 

I got another "Granted" from Google Cloud.

So I typed gcloud services enablecloudaicompanion.googleapis.com into CloudShell again.

This time there were no errors.

 

I then opened the console and saw a chat icon with DuetAI in the top right corner.

 

 I got instructions to send the project number.

 I remembered that I had mistaken it for the project ID.

I just did the same - this seems to be the “solution"

Roderick
Community Manager
Community Manager

Hey all - Today, Google Cloud announced that Duet AI for Developers is now generally available (GA). Please le me know if you're still having challenges getting access and check out these community resources