powershell - 获取 Azure 订阅 : Failed to refresh token. AADSTS90002

标签 powershell azure

我在执行 Microsoft Azure powershell 命令时遇到奇怪的错误。通过 Add-AzureAccount 成功将我的帐户添加到 shell 后,我在执行 Get-AzureSubscription 时遇到失败。错误消息显示:

Get-AzureSubscription : Failed to refresh token. AADSTS90002: No service namespace named
'[REMOVED GUID FROM QUESTION]'was found in the data store.
Trace ID: [REMOVED GUID FROM QUESTION]
Correlation [REMOVED GUID FROM QUESTION]
Timestamp: 2015-02-15 20:34:14Z: The remote server returned an error: (400) Bad Request.

我对一个帐户有多个订阅。看起来有一个租户可能在本地与该帐户关联,但在进行 REST 调用时该租户不存在。我之前确实删除了 Azure AD 域。

最佳答案

删除文件夹C:\Users\\AppData\Roaming\Windows Azure Powershell的内容

然后再次运行 Add-AzureAccount 来获取新的

关于powershell - 获取 Azure 订阅 : Failed to refresh token. AADSTS90002,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28533788/

相关文章:

PowerShell:如果 "mkdir"命令的文件已存在,如何抑制错误?

c# - 将 Application Insights 与 Windows 10 IoT 核心版结合使用

node.js - 我无法从我的 REACT 应用程序的 azure 应用程序服务配置中读取环境变量

azure - 您的 Azure 凭据尚未设置或已过期,请运行 Connect-AzAccount 来设置您的 Azure 凭据

powershell - 阻止Powershell在参数周围加上双引号

python - 在 windows powershell 上使用 django-admin

azure - Azure Durable 函数中维护什么状态?

适用于 Office 365 的 Azure AD 未显示在新门户中

powershell - 如何使用 PowerShell 获取 Azure 中运行的 VM 脚本的 ResourceId?

database - 我想在 red hat linux 服务器上执行一个 .ps1 powershell 脚本