azure - Visual Studio 2022 缓存旧租户 ID,无法删除它

标签 azure visual-studio

Visual Studio 在尝试在集成的 Microsoft Identity 平台工具中登录 Azure 时选择了错误的租户 ID,我没有它显示的 GUID,我的租户 ID Guid 对于用户来说是不同的,用户名是显示在错误消息的右侧。我尝试在 Azure 门户中搜索它向我显示的 GUID(从 f8cd 开始..),但无法找到任何内容,不知道 VS 从哪里获取它,可能是我过去很久使用过的一些旧 GUID。

enter image description here

我重新启动了 studio,重新启动了 Windows,注销,登录,没有任何帮助。我清理了 \AppData\Local\.IdentityService\AzureServiceAuth,它也没有帮助。

当我在 cmd 中输入 az account show 时,它会显示正确的用户和正确的租户 ID 以及主租户 ID

选中/取消选中 VS 设置中的复选框也没有帮助 enter image description here

最佳答案

需要检查以下步骤:

  1. 缓存问题:

转到 Visual Studio 右上角的帐户设置,删除所有现有的登录帐户,然后使用所需的帐户重新输入您的凭据。这将帮助您解决缓存问题。

enter image description here

引用SO我为您提供了更多相关信息。

  • 转到
  • control panel >> User accounts >> Credential Manager >> Windows Credentials
    

    如图所示删除 Visual Studio 凭据并添加它。

    enter image description here

  • 重置 Visual Studio 中的所有设置,方法是: 工具 > 导入和导出设置 > 重置所有设置
  • 或者

    Tools >> Options >> Environment >> Accounts >> Clear all the logged in accounts.
    

    enter image description here

  • 如果上述方法均不起作用,请尝试修复 Visual Studio 安装
  • Control Panel >> Programs and Features >> Microsoft Visual Studio >> Change >> Repair
    

    enter image description here

    如果问题仍然存在,请卸载 Visual Studio 并使用 Visual Studio 官方网站上的最新版本重新安装。

    关于azure - Visual Studio 2022 缓存旧租户 ID,无法删除它,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75953145/

    相关文章:

    visual-studio - amd64 编译器在 Visual Studio 2022 中的位置 |使用 NVENC 编译 FFmpeg

    c# - 如何在 Visual Studio 中使用正确的编码打开阿拉伯文本文件

    c# - 有没有办法在 Visual Studio 中查看内存中的实际对象

    c# - 处理大量类 : Can I nest C# files in folders arbitrarily?

    c++ - Visual Studio 2010 专业版 : Cannot find include file "new.h"

    Azure 队列存储 - 在调用 CloudQueue.GetMessages() 后立即将消息标记为可见

    azure - New-AzureRmPolicyDefinition 和 New-AzPolicyDefinition 之间的差异

    azure - 在azure逻辑应用程序中阅读附件时如何比较电子邮件附件扩展名?

    c# - 我的 ASP.NET Core 应用服务 Web API 如何支持 AAD 承载 token 和客户端证书身份验证?

    Azure 对等互连集线器和分支 IP 范围可能重叠吗?