Gcloud authenticated as googlemail.com but project Owner is gmail.com

Hi everyone,

I’m new to Google Cloud and I’ve run into an identity issue that I can’t explain.

I have what I believe is a single Google account. I normally log in using:

user@googlemail.com

If I try to sign in with:

user@gmail.com

Google automatically redirects me back to:

user@googlemail.com

which made me think they are simply aliases of the same account.

In Cloud Shell, gcloud auth list shows:

$ gcloud auth list

Credentialed Accounts

ACTIVE  ACCOUNT
*       user@googlemail.com

I then created a new project using the CLI:

gcloud projects create test-project

The project was created successfully.

However, when I looked at the project’s IAM page in the Google Cloud Console, the Owner of the project was:

user@gmail.com

instead of:

user@googlemail.com

Because of this, when I try to enable an API from Cloud Shell, I receive permission errors similar to:

gcloud services enable artifactregistry.googleapis.com

ERROR: PERMISSION_DENIED
This command is authenticated as user@googlemail.com

At this point I’m confused because:

  • gcloud auth list only shows user@googlemail.com
  • I created the project using the gcloud CLI
  • The project’s Owner is user@gmail.com
  • Logging in with user@gmail.com always redirects me to user@googlemail.com

My questions are:

  1. Is this expected behaviour for gmail.com and googlemail.com aliases in Google Cloud?
  2. Does Google Cloud IAM treat these as different principals?
  3. If they are aliases of the same Google account, why does the project Owner appear as user@gmail.com while gcloud authenticates as user@googlemail.com?
  4. How can I ensure that the identity used by gcloud matches the identity that owns the project?

I’m trying to understand how Google Cloud handles identities rather than just finding a workaround.

Thanks in advance for any explanation.

1 Like