窗户上的天蓝色cli不起作用

时间:2016-05-09 22:35:23

标签: windows azure command-line-interface

我为azure安装了cli,我想使用azure login -u登录,以下是我得到的错误:

不支持的wstrust端点版本。目前的支持版本是wstrust2005或wstrust13

C:\Program Files\Microsoft SDKs\Windows Azure\.NET SDK\2012-10>azure login -u <email-address>
info:    Executing command login
Password: ********
- Authenticating...info:    Mon, 09 May 2016 22:30:21 GMT:4f547628-a89c-48b1-999
a-9050a4692bf1 - Authority: VERBOSE: Performing instance discovery: https://logi
n.microsoftonline.com/common
info:    Mon, 09 May 2016 22:30:21 GMT:4f547628-a89c-48b1-999a-9050a4692bf1 - Au
thority: VERBOSE: Performing static instance discovery
info:    Mon, 09 May 2016 22:30:21 GMT:4f547628-a89c-48b1-999a-9050a4692bf1 - Au
thority: VERBOSE: Authority validated via static instance discovery.
info:    Mon, 09 May 2016 22:30:21 GMT:4f547628-a89c-48b1-999a-9050a4692bf1 - To
kenRequest: INFO: Acquiring token with username password
info:    Mon, 09 May 2016 22:30:21 GMT:4f547628-a89c-48b1-999a-9050a4692bf1 - Ca
cheDriver: VERBOSE: finding with query:{"clientId":"4b07795-8ddb-461a-bbee-02f9
e1bf7b4","userId":"<email>"}
info:    Mon, 09 May 2016 22:30:21 GMT:4f547628-a89c-48b1-999a-9050a4692bf1 - Ca
cheDriver: VERBOSE: Looking for potential cache entries:
info:    Mon, 09 May 2016 22:30:21 GMT:4f547628-a89c-48b1-999a-9050a4692bf1 - Ca
cheDriver: VERBOSE: {"_clientId":"4b07795-8ddb-461a-bbee-02f9e1bf7b4","userId"
:"<email>"}
info:    Mon, 09 May 2016 22:30:21 GMT:4f547628-a89c-48b1-999a-9050a4692bf1 - Ca
cheDriver: VERBOSE: Found 0 potential entries.
info:    Mon, 09 May 2016 22:30:21 GMT:4f547628-a89c-48b1-999a-9050a4692bf1 - To
kenRequest: VERBOSE: No appropriate cached token found.
info:    Mon, 09 May 2016 22:30:21 GMT:4f547628-a89c-48b1-999a-9050a4692bf1 - Us
erRealm: VERBOSE: Performing user realm discovery at: https://login.microsoftonl
ine.com/common/UserRealm/<email>?api-version=1.0
|info:    Mon, 09 May 2016 22:30:22 GMT:4f547628-a89c-48b1-999a-9050a4692bf1 - U
serRealm: INFO: User Realm DiscoveryServer returned this correlationId: f547628
-a89c-48b1-999a-9050a4692bf
info:    Mon, 09 May 2016 22:30:22 GMT:4f547628-a89c-48b1-999a-9050a4692bf1 - Us
erRealm: VERBOSE: Discovery response:
{"ver":"1.0","account_type":"Federated","domain_name":"<domain-name>","federati
on_protocol":"WSTrust","federation_metadata_url":"https://adfs365prod.bns/adfs/s
ervices/trust/mex","federation_active_auth_url":"https://adfs365prod.bns/adfs/se
rvices/trust/2005/usernamemixed","cloudinstancename":"login.microsoftonline.com"
}
info:    Mon, 09 May 2016 22:30:22 GMT:4f547628-a89c-48b1-999a-9050a4692bf1 - Us
erRealm: VERBOSE: UserRealm response:
info:    Mon, 09 May 2016 22:30:22 GMT:4f547628-a89c-48b1-999a-9050a4692bf1 - Us
erRealm: VERBOSE:  AccountType:             federated
info:    Mon, 09 May 2016 22:30:22 GMT:4f547628-a89c-48b1-999a-9050a4692bf1 - Us
erRealm: VERBOSE:  FederationProtocol:      wstrust
info:    Mon, 09 May 2016 22:30:22 GMT:4f547628-a89c-48b1-999a-9050a4692bf1 - Us
erRealm: VERBOSE:  FederationMetatdataUrl:  https://adfs365prod.bns/adfs/service
s/trust/mex
info:    Mon, 09 May 2016 22:30:22 GMT:4f547628-a89c-48b1-999a-9050a4692bf1 - Us
erRealm: VERBOSE:  FederationActiveAuthUrl: https://adfs365prod.bns/adfs/service
s/trust/2005/usernamemixed
info:    Mon, 09 May 2016 22:30:22 GMT:4f547628-a89c-48b1-999a-9050a4692bf1 - To
kenRequest: VERBOSE: Acquiring token with username password for federated user
info:    Mon, 09 May 2016 22:30:22 GMT:4f547628-a89c-48b1-999a-9050a4692bf1 - To
kenRequest: VERBOSE: Attempting mex at: https://adfs365prod.bns/adfs/services/tr
ust/mex
info:    Mon, 09 May 2016 22:30:22 GMT:4f547628-a89c-48b1-999a-9050a4692bf1 - ME
X: VERBOSE: Mex created with url: https://adfs365prod.bns/adfs/services/trust/me
x
info:    Mon, 09 May 2016 22:30:22 GMT:4f547628-a89c-48b1-999a-9050a4692bf1 - ME
X: VERBOSE: Retrieving mex at: https://adfs365prod.bns/adfs/services/trust/mex
|info:    Mon, 09 May 2016 22:30:24 GMT:4f547628-a89c-48b1-999a-9050a4692bf1 - M
EX: ERROR: Mex Get request failed with
Stack:
Error: getaddrinfo ENOTFOUND adfs365prod.bns adfs365prod.bns:443
    at errnoException (dns.js:26:10)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:77:26)
error:   Error: getaddrinfo ENOTFOUND adfs365prod.bns adfs365prod.bns:443
info:    Mon, 09 May 2016 22:30:24 GMT:4f547628-a89c-48b1-999a-9050a4692bf1 - To
kenRequest: WARNING: MEX exchange failed.  Attempting fallback to AAD supplied e
ndpoint.
info:    Mon, 09 May 2016 22:30:24 GMT:4f547628-a89c-48b1-999a-9050a4692bf1 - WS
TrustRequest: ERROR: Unsupported wstrust endpoint version. Current support versi
on is wstrust2005 or wstrust13.
Stack:
Error: Unsupported wstrust endpoint version. Current support version is wstrust2
005 or wstrust13.
    at Logger.createError (C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\node_
modules\adal-node\lib\log.js:201:13)
    at WSTrustRequest.acquireToken (C:\Program Files (x86)\Microsoft SDKs\Azure\
CLI\node_modules\adal-node\lib\wstrust-request.js:203:25)
    at TokenRequest._performWSTrustExchange (C:\Program Files (x86)\Microsoft SD
Ks\Azure\CLI\node_modules\adal-node\lib\token-request.js:286:11)
    at TokenRequest._performUsernamePasswordForAccessTokenExchange (C:\Program F
iles (x86)\Microsoft SDKs\Azure\CLI\node_modules\adal-node\lib\token-request.js:
311:8)
    at C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\node_modules\adal-node\li
b\token-request.js:371:12
    at Request._callback (C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\node_m
odules\adal-node\lib\util.js:119:7)
    at self.callback (C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\node_modul
es\request\request.js:199:22)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)
    at Request.onRequestError (C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\n
ode_modules\request\request.js:821:8)
error:   Error: Unsupported wstrust endpoint version. Current support version is
 wstrust2005 or wstrust13.
info:    Mon, 09 May 2016 22:30:24 GMT:4f547628-a89c-48b1-999a-9050a4692bf1 - To
kenRequest: VERBOSE: getTokenFunc returned with err
+
**error:   Unsupported wstrust endpoint version. Current support version is wstrus
t2005 or wstrust13.
info:    Error information has been recorded to C:\Users\minoo\.azure\azure.err
error:   login command failed**

1 个答案:

答案 0 :(得分:0)

最新的Azure CLI需要交互式登录,您只需使用azure login登录,然后使用浏览器进行身份验证即可。

如果您需要以静默方式登录自动化方案。您可以从azure门户创建活动目录中的服务主体。创建服务主体后,它可用于静默登录。如果您没有创建服务主体的权限,那么您组织的管理员应该能够创建一个。

您可以参考Azure Xplat-CLI cannot login due to WS-trust了解详细信息。希望它有所帮助。