错误:我们没有使用Azure CLI的有效访问天蓝色 [英] Error: We don't have a valid access azure with Azure CLI

查看:38
本文介绍了错误:我们没有使用Azure CLI的有效访问天蓝色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Azure CLI的较新用户.因此,我昨天开始使用它.一切正常,直到我在控制台上收到需要使用Azure登录命令再次登录的消息.

I'm a newer user of Azure CLI. So, i started to used it yesterday. Everything was ok until I received a message on the console that I need to login again, using the command Azure login.

我按照消息说的做了.打开我的浏览器并输入代码.浏览器将页面加载到一切正常的状态.但是,当我进入控制台窗口时,会收到以下消息:

I did that the message say. Open my browser and enter the code. The browser load the page that every things it's ok. But, when i go to the console window I receive these message:

error:   We don't have a valid access token. Please run "azure login" again.
info:    Error information has been recorded to C:\Users\julia\.azure\azure.err
error:   login command failed

on the detail error file, this is the content:
2015-12-09T14:25:39.477Z - info:    Executing command login
2015-12-09T14:25:40.278Z - info:    To sign in, use a web browser to open the page aka.ms/devicelogin. Enter the code FYEBRSSSW to authenticate. If you're signing in as an Azure AD application, use the --username and --password parameters.
2015-12-09T14:25:40.278Z - verbose: code response from AAD is :{"userCode":"FYEBRSSSW","deviceCode":"FAAABAAEAiL9Kn2Z27UubvWFPbm0gLSP06OmChH0nnUbKKbL9_GLsujCsreUiKWZtv3DBNS6o5dK7vblnGRAk_b_3oO64FJ9f6Dd306_5P_ZlMUwIPCD-a02NydqTyYXXXXXXX","verificationUrl":"aka.ms/devicelogin","expiresIn":900,"interval":5,"message":"To sign in, use a web browser to open the page https://aka.ms/devicelogin. Enter the code FYEBRSSSW to authenticate. If you're signing in as an Azure AD application, use the --username and --password parameters."}
2015-12-09T14:36:25.449Z - error:   We don't have a valid access token. Please run "azure login" again.
2015-12-09T14:36:25.451Z - silly:   {
2015-12-09T14:36:25.451Z - silly:       stack: "Error: We don't have a valid access token. Please run "azure login" again.\n    at _polishError (C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI\\lib\\util\\authentication\\adalAuthForUser.js:64:10)\n    at C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI\\lib\\util\\authentication\\adalAuthForUser.js:48:25\n    at C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI\\lib\\util\\authentication\\token-cache.js:96:9\n    at C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI\\node_modules\\async\\lib\\async.js:52:16\n    at C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI\\node_modules\\async\\lib\\async.js:272:32\n    at C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI\\node_modules\\async\\lib\\async.js:44:16\n    at C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI\\lib\\util\\authentication\\win-token-storage.js:169:16\n    at C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI\\node_modules\\async\\lib\\async.js:697:13\n    at C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI\\node_modules\\async\\lib\\async.js:52:16\n    at C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI\\node_modules\\async\\lib\\async.js:272:32",
2015-12-09T14:36:25.452Z - silly:       message: "We don't have a valid access token. Please run "azure login" again.",
2015-12-09T14:36:25.452Z - silly:       __frame: {
2015-12-09T14:36:25.452Z - silly:           name: '__1',
2015-12-09T14:36:25.452Z - silly:           line: 47,
2015-12-09T14:36:25.452Z - silly:           file: 'C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI\\lib\\commands\\login.js',
2015-12-09T14:36:25.452Z - silly:           prev: undefined,
2015-12-09T14:36:25.452Z - silly:           calls: 0,
2015-12-09T14:36:25.452Z - silly:           active: false,
2015-12-09T14:36:25.452Z - silly:           offset: 53,
2015-12-09T14:36:25.452Z - silly:           col: 27
2015-12-09T14:36:25.452Z - silly:       },
2015-12-09T14:36:25.452Z - silly:       rawStack: " token. Please run "azure login" again.\n    at _polishError (C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI\\lib\\util\\authentication\\adalAuthForUser.js:64:10)\n    at C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI\\lib\\util\\authentication\\adalAuthForUser.js:48:25\n    at C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI\\lib\\util\\authentication\\token-cache.js:96:9\n    at C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI\\node_modules\\async\\lib\\async.js:52:16\n    at C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI\\node_modules\\async\\lib\\async.js:272:32\n    at C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI\\node_modules\\async\\lib\\async.js:44:16\n    at C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI\\lib\\util\\authentication\\win-token-storage.js:169:16\n    at C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI\\node_modules\\async\\lib\\async.js:697:13\n    at C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI\\node_modules\\async\\lib\\async.js:52:16\n    at C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI\\node_modules\\async\\lib\\async.js:272:32"
2015-12-09T14:36:25.452Z - silly:   }
2015-12-09T14:36:25.458Z - info:    Error information has been recorded to C:\Users\julia\.azure\azure.err

当我加入门户时,一切正常,我的帐户处于活动状态,我可以毫无问题地创建和监视所有机器.在de Azure CLI v2.8中,这是一种特殊情况.

When i join to the portal, everything it is alright, my account is active, i can create and monitore all my machines without problem. It's a particular situation with de Azure CLI v2.8.

顺便说一句,我尝试"azure注销和azure clear -q"命令没有成功.

By the way, i try the "azure logout and azure clear -q" commands without success.

推荐答案

如果您有多个Azure帐户,通常会发生这种情况.我的意思是这是一个浏览器->缓存/cookies 问题.

This usually happens if you have multiple azure accounts. I mean this is a browser->cache/cookies problem.

您应该打开一个私人浏览器会话,甚至使用另一个浏览器,并通过控制台CLI提供的链接在那里开始一个新的会话.

You should open a private browser session, or even use another browser and start a fresh session there using the link provided by the console CLI.

这应该有效!

这篇关于错误:我们没有使用Azure CLI的有效访问天蓝色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆