尝试连接Mend.io致Azure订阅无法访问,寻求技术帮助
尝试将Mend.io与Azure实例连接时,按要求关联Azure默认目录并修改设置后,出现以下异常:
- 登录Azure门户无法访问订阅,点击订阅确认邮件链接也跳转到无订阅首页
- 操作Azure时触发认证错误:
"The portal is having issues getting an authentication token. The experience rendered may be degraded.
Additional information from the call to get a token:
Extension: Microsoft_Azure_Support
Resource: self
Details: The logged in user is not authorized to fetch tokens for extension 'Microsoft_Azure_Support' because the user account is not a member of tenant 'xxxxxxxxxxxxxxx'.
Error details: invalid_grant: 50020 - [2024-06-03 19:31:16Z]: AADSTS50020: User account '{EUII Hidden}' from identity provider 'live.com' does not exist in tenant 'Microsoft Services' and cannot access the application 'xxxxxxxxxxxxxxx (Azure Portal) in that tenant. The account needs to be added as an external user in the tenant first. Sign out and sign in again with a different Azure Active Directory user account."
- Azure DevOps中Mend.io未成功连接,但仍可向目标订阅部署资源
1. 切换回订阅所属的Azure租户
- 点击Azure门户右上角账户头像旁的下拉菜单,选择切换目录
- 在目录列表中选中你原本绑定订阅的租户(排除'Microsoft Services'),完成切换
- 若列表中无目标租户,用浏览器私人窗口重新登录Azure,确保登录账号为订阅关联的账号
2. 确认用户账号在目标租户中的权限
- 登录Azure AD管理中心,进入目标租户页面
- 导航至用户模块,检查你的live.com账号是否已被添加为该租户的成员或外部用户
- 若未添加,联系租户管理员将你的账号邀请为外部用户,并分配至少订阅读者权限(需管理权限则分配对应角色)
3. 清空Azure会话缓存
- 完全退出所有Azure相关平台的登录会话(Azure门户、DevOps、Office等)
- 清除浏览器中与
azure.com、microsoftonline.com相关的缓存和Cookie - 重启浏览器后重新登录Azure,确认选择的是正确租户
4. 验证订阅与租户的绑定关系
- 若能进入Azure AD管理中心,找到订阅页面,确认当前订阅关联的租户为目标目录
- 若订阅绑定到错误租户,联系Azure支持团队协助调整订阅的租户归属(跨租户转移需满足订阅为付费类型、无未结清费用等条件)
5. 重新配置Mend.io与Azure DevOps的连接
- 待Azure订阅访问恢复后,先卸载DevOps中的Mend.io扩展,重新安装
- 重新配置连接时,确保选择的Azure租户与订阅所在租户一致,避免再次切换到错误目录
内容的提问来源于stack exchange,提问作者Cameron Cox

