'gcloud alpha iap oauth-brands create' getting INVALID PARAMETER

892 Views Asked by At

For some reason I deleted so called brand entity at my gcloud console. Now I want to create new one using the command in the console:

gcloud alpha iap oauth-brands create --application_title='EmojiRave' --support_email='[email protected]'

But the console returns me back : INVALID_ARGUMENT: Request contains an invalid argument.

  1. I've used different formats (using brackets and without them)
  2. I've checked whether I have enough permissions to do it (I use owner account, so it's enough permissions)

I'm desperate.

2

There are 2 best solutions below

0
On

Overall, my suggestion is to update the OAuth Consent Screen via GCP Console.

  1. Go to the Google Cloud Platform Console.
  2. From the projects list, select a project or create a new one.
  3. If the APIs & services page isn't already open, click on the Navigation Menu on the upper left and select APIs & services.
  4. On the left, click OAuth Consent Screen.
  5. Click Edit App.

First, it's not possible to delete the OAuth Consent Screen (Brand) once created. This can be seen from @DaImTo's answer, and the lack of delete option in both gcloud command and in the console.

I also tested your command on my Cloud Shell and it works fine as well. I've checked the documentation with regards gcloud alpha iap oauth-brands and it is currently in ALPHA state. It may change without prior notice and it may not be stable or work to all users. If you still want to use the CLI and request to be allow-listed regarding this command, my suggestion is to contact sales, as instructed on the issue tracker you've made.

0
On

There are two potential reasons for the failure:

1. Incorrect email address. According to the docs: "This [support] email address can either be a user's address or a Google Groups alias. [...] Note: The user issuing the request must be an owner of the specified support email address."

2. Project is not in an organisation. According to this source (see under limitations): If you're [..] outside a Cloud Orginization most likely you'll get an error on step "Creating oauth brand".