How do I use a Microsoft account (non-organizational) using Add-AzureAccount?

I am trying to use the command Add-AzureAccount

for the Azure PowerShell tools part (Aug 2014, v0.8.6), and while various examples on the web make me expect it to allow me to use either an organizational account or a Microsoft account to log in, in practice it seems like an organization account is required.

When I execute the command, it opens a browser window as expected, but the prompt says Sign in with your organizational account

followed by a username and password. There seems to be no way to say no, I really need to use a Microsoft account.

(As it happens, my email address is associated with both an organization account and a Microsoft account. This may not help.)

I can create a completely separate organizational account in Azure Active Directory, make it a co-admin, and log in with that, but it looks like it's not necessary.

Is there any way I can get him to offer me both options?

+3


source to share


4 answers


Use @ outlook.com instead of your organizational address and you will be redirected to sign in to your Microsoft account.



+2


source


I managed to solve this problem through trial and error. As Pavel points out in his post, you can upload your subscription information to PowerShell using the following sequence:

1. Get-AzurePublishSettingsFile

This will open the browser to a special page that allows you to download the profile settings file.

Note. If you have multiple subscribers, you must use the dropdown to select the one that contains the Azure components that you want to manage. For example, I have a BizSpark subscription that I use for my own company, and a separate MSDN subscription that my customers use (adding me as administrator). Both subscriptions show up on my management portal page, so I needed to download 2 separate publish files.

2. Import-AzurePublishSettingsFile my-subscription.publishsettings



In my case, I renamed the settings files to "BizSpark.publishsettings" and "MSDN.publishsettings", so I ran this command twice.

3. Get-AzureSubscription

All subscriptions that were imported into PowerShell are listed here, with the subscription name and other properties.

4. Select-AzureSubscription -SubscriptionName "my-subscription"

You can now use the subscription name to select the subscription you want to use. This allows you to switch between subscriptions and work with the Azure components that you need to manage.

+5


source


Azure can be registered with either a Microsoft account or an organizational account. Add-AzureAccount will display a message like "Sign in with your organization account" in the browser window, but in fact, if you enter your Microsoft account email address in the field and move the focus, the page will automatically go to the Microsoft account sign up page, and then you can login.

Sometimes you may come across some kind of error, for example: "The cache contains several tokens that meet the requirements." Try clearing any existing Azure accounts first, and then try to sign in again.

To clean up, run Get-AzureAccount | Remove-AzureAccount.

0


source


I have a similar problem. Using Add-AzureAccount

with my Microsoft account, add my organizational account.

For example, I run Add-AzureAccount

, in a form, I type davideicardi@hotmail.com

(my Microsoft account) but the given account davide.icardi@mycompany.com

(my organizational account).

I decided to delete all Azure account registered with Power Shell (also not associated with my account using Remove-AzureAccount

), after which I deleted the IE cookie (not sure if this is important ...), closed the powershell console and run again Add-AzureAccount

.

I suspect there is a bug somewhere ...

0


source







All Articles