projectkudu / ARMClient

A simple command line tool to invoke the Azure Resource Manager API
http://blog.davidebbo.com/2015/01/azure-resource-manager-client.html
Other
316 stars 97 forks source link

Can's use ARMCient with VSO #23

Closed suwatch closed 9 years ago

suwatch commented 9 years ago

@suwatch I try to use ARMClient for VSO, but any request from ARMClient to VSO like ARMClient.exe get "https://app.vssps.visualstudio.com/_apis/profile/profiles/me?api-version=1.0" return the authentication page. In some time all requests to SCM like: ARMClient.exe get "/subscriptions?api-version=2014-04-01" is successful and return JSON.

ARMClient is authenticated in Azure through ARMClient.exe login and my VSO account is linked to my Azure account. Is this bug or I doing something wrong? Maybe better is forwarding this question to ARMClient Issues?

suwatch commented 9 years ago

I just tried and it worked fine for me (meaning return json).

ARMClient.exe get "https://app.vssps.visualstudio.com/_apis/profile/profiles/me?api-version=1.0"

@denisyfrolov, did you build ARMClient or get it thru chocolatey?

denisyfrolov commented 9 years ago

@suwatch I get it thru chocolatey.

suwatch commented 9 years ago

It works fine for me. I also get thru chocolatey armclient. The latest version of armclient is 1.0.3. Can you make sure it is the same?

denisyfrolov commented 9 years ago

ARMClient version 1.0.3.0

Maybe it is better to build it from source?

denisyfrolov commented 9 years ago

Imgur here my subscriptions, maybe problem in that I have several subscriptions? How I can specify subscription for access to VSO?

suwatch01 commented 9 years ago

Run armclient token <tenantId> to switch to different tenant that subscriptions belong to. TenantId is guid, you can see by running armclient listcache. More info here.

Either way, it should not re-prompt you to login. Something else is not right here.

denisyfrolov commented 9 years ago

Yep, it helped. Thanks!

suwatch commented 9 years ago

Alright then. I will close it for now.