Error fetching vm list using azure cli tools

*爱你&永不变心* 提交于 2019-12-12 03:24:46

问题


I'm using azure tools on mac OS X. I did run following commands :

1. $ azure login
2. $ azure account download
3. $ azure import .publishsettings
4. $ azure account set "subscription id"

But now when I run

$ azure vm list

it shows following error :

{ [Error: The server failed to authenticate the request. Verify that the certificate is valid and is associated with this subscription.] code: 'ForbiddenError', statusCode: 403 }
Error: The server failed to authenticate the request. Verify that the certificate is valid and is associated with this subscription.
    at Function.ServiceClient._normalizeError (/usr/local/lib/node_modules/azure-cli/node_modules/azure-common/lib/services/serviceclient.js:815:23)
    at /usr/local/lib/node_modules/azure-cli/node_modules/azure-common/lib/services/filters/errorhandlingfilter.js:44:29
    at Request._callback (/usr/local/lib/node_modules/azure-cli/node_modules/azure-common/lib/http/request-pipeline.js:109:14)
    at Request.self.callback (/usr/local/lib/node_modules/azure-cli/node_modules/azure-common/node_modules/request/request.js:199:22)
    at Request.emit (events.js:98:17)
    at Request.<anonymous> (/usr/local/lib/node_modules/azure-cli/node_modules/azure-common/node_modules/request/request.js:1160:14)
    at Request.emit (events.js:117:20)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/azure-cli/node_modules/azure-common/node_modules/request/request.js:1111:12)
    at IncomingMessage.emit (events.js:117:20)
    at _stream_readable.js:944:16

回答1:


Issue was with the subscription permission. You need to go to https://manage.windowsazure.com and add user as co-admin then add him owner on http://portal.azure.com.

Adding a user from http://portal.azure.com and making him owner, alone does not work.



来源:https://stackoverflow.com/questions/36125930/error-fetching-vm-list-using-azure-cli-tools

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!