1

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='rebelusgames@gmail.com'

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.

Donnald Cucharo
  • 3,866
  • 1
  • 10
  • 17
  • 1
    I tested your command on a fresh project with my own input and it works completely fine. Run `gcloud version` and make sure the `alpha` component is up-to-date. Currently I'm running 2021.09.10. – Donnald Cucharo Sep 20 '21 at 06:08
  • Hi @Dondi! My cloud version is alpha 2021.09.10. But still invalid argument. Shall I somehow enrol myself into alpha program? Or make some magic with whitelisting myself? – Сергей Мацкевич Sep 20 '21 at 18:45
  • It's not possible to delete the OAuth Consent Screen so I don't understand how were you able to do it. Could you try to add `--verbosity=debug` at the end of your command and see if there's anything actionable in the message? My suggestion is to simply go to the Consent Screen and click **Edit App** if you want to make any revisions. – Donnald Cucharo Sep 21 '21 at 05:25

2 Answers2

0

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".

Samuli Asmala
  • 1,755
  • 18
  • 24
-1

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.

Robert G
  • 1,583
  • 3
  • 13