如何在Google开发者控制台OAuth同意屏将Gmail备用邮箱设为支持邮箱
问题现象
- 持有一个@gmail.com Google账号,已将自有域名下的@domain.com邮箱添加为该账号的备用邮箱,可使用@domain.com替代原@gmail.com地址登录该Gmail账号。

- 创建Google Cloud项目后,尝试将@domain.com设置为OAuth同意屏的支持邮箱,按照IAM配置步骤在IAM板块添加@domain.com邮箱地址后,仍无法将其选为支持邮箱。
- 在Google Cloud活动标签页接受权限邀请时出现HTTP 403报错,报错信息如下:
Permission denied (HTTP 403): IAM authority does not have the permission 'resourcemanager.projectInvites.acceptProjectOwnership' required for action CloudResourceManagerInvitationsService-AcceptProjectOwnership on resource 'projects/ofpad-1304'. Explanation: Security Context: RecordingSecurityContext{delegate=ValidatedSecurityContextWithSystemAuthorizationPolicy{delegate=ValidatedSecurityContextWithRegistryHandle{delegate=ValidatedSecurityContextWithObligations{delegate=ContextWithGaiaMintToken{delegate=ValidatedIamSecurityContext{user=gaiauser/0xd22a3e2d9, creds=EndUserCreds{loggable_credential { type: GAIA_MINT loggable_gaia_mint { } } loggable_credential { type: SERVICE_CONTROL_TOKEN }}, peer=protocol=loas;psp_version=0;level=strong_privacy_and_integrity;host=saec4.prod.google.com;is_authenticated_host=false;role=cloud-boq-clientapi-iam;gaiaId=250014094659;security_realm=campus-wen;is_delegated=false;user_type=MDB_USER_NON_PERSON, InternalIAMIdentity{log=originator { scope: GAIA_USER gaia_user { user_id: 56415740633 } }}}}}}}}
- 当前OAuth同意屏的支持邮箱选择列表中仅能看到原@gmail.com邮箱地址,无@domain.com选项。

问题根因
绑定在Gmail账号下的备用邮箱仅作为主账号的登录别名存在,不属于独立的Google Cloud身份主体。直接在IAM中添加该别名邮箱时,系统无法将其识别为有效账号,因此既无法正常接受项目权限邀请,也不会出现在支持邮箱的可选列表中。
修复步骤
- 登录原@gmail.com对应的Google账号,进入账号安全设置页面,移除@domain.com的备用邮箱绑定关系。
- 使用@domain.com自有域名邮箱,注册一个独立的Google账号,注册时无需开通Gmail服务,按流程完成邮箱验证即可。
- 切回原@gmail.com账号登录Google Cloud控制台,进入对应项目的IAM管理页面,为新注册的@domain.com独立Google账号授予「项目所有者(Project Owner)」角色,发送权限邀请。
- 退出当前账号,登录@domain.com对应的独立Google账号,找到Cloud项目发送的权限邀请并确认接受,返回IAM页面确认该账号已显示为已激活的项目所有者。
- 等待10-15分钟,待Google Cloud的权限数据完成全局同步后,再进入OAuth同意屏配置页面,即可在支持邮箱下拉列表中找到并选中@domain.com地址。
说明:如果不想授予项目所有者最高权限,也可以为该账号分配包含clientauthconfig.brands.update权限的自定义角色,直接授予所有者角色是操作成本最低、不会出现权限缺失报错的方案。
内容的提问来源于stack exchange,提问作者Abhishek R
相关产品推荐
相关产品推荐

