Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

ARM mode with publishsettings fails with non-friendly message #1614

Closed
ahmetb opened this issue Mar 5, 2015 · 6 comments
Closed

ARM mode with publishsettings fails with non-friendly message #1614

ahmetb opened this issue Mar 5, 2015 · 6 comments
Labels

Comments

@ahmetb
Copy link
Contributor

ahmetb commented Mar 5, 2015

I set azure config mode arm and I run azure account --help and it shows that I can actually use .publishsettings file and I used azure account download then I used azure account import then I set the active subscription correctly.

However when I run a command in authenticated mode. It fails in an ugly way with the following error message:

$  azure group list
info:    Executing command group list
+ Listing resource groups
error:   Authentication failed. The 'Authorization' header is not present or provided in an invalid format.
error:   Cannot read property 'Symbol(formatted stack trace)' of undefined
info:    Error information has been recorded to /Users/alp/.azure/azure.err
error:   group list command failed

I can't use a corporate account (because the account isn't) and I'm clueless about how can I possibly authenticate. As a user, please tell me I'm using a wrong method to authenticate; not the Authorization header is invalid.

I know this stuff is still in preview but I just wanted to make sure you guys are aware of the situation. @guangyang

@markcowl
Copy link
Member

@ahmetalpbalkan Will look at improving the error message, or perhaps making the certificate cmdlets unabailable in ARM mode.

You need to have an OrgID account to authenticate - this is an AAD restriction. Tis blog post has details on how to create an org id account for your subscription if you're currently using AAD credentials:

http://azure.microsoft.com/blog/2014/08/27/azure-automation-authenticating-to-azure-using-azure-active-directory/

@ahmetb
Copy link
Contributor Author

ahmetb commented Mar 13, 2015

@markcowl sounds perfect, can we have this URL in the error message? I already know the solution. @squillace @johngossman

@matt-gibbs
Copy link
Contributor

@ahmetalpbalkan, @johngossman
The link might be an ok temporary solution. Making the commands unavailable would be better. Simplifying the auth configuration would be the longer-term even better solution.

@amarzavery
Copy link
Contributor

@ahmetalpbalkan - The corresponding PR to improve the error message is here

@amarzavery
Copy link
Contributor

D:\sdk\xplat\azure-sdk-tools-xplat>node bin\azure group list
info:    Executing command group list
+ Listing resource groups
error:   Certificate based Authentication is not supported in current mode: 'arm'. Please authenticate using an organizational account via 'azure login' command.
info:    Error information has been recorded to C:\Users\amzavery\.azure\azure.err
error:   group list command failed

@amarzavery
Copy link
Contributor

Fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants