locked
Add-AzureAccount - Account1 Ids do not match RRS feed

  • Question

  • I have been using Azure as a part of my MSDN subscription for a while. I used Azure Powershell to log on to my account and e.g. move data to the blob storage. Everything worked fine.

    Today I have been assigned to a new subscription. Additionally to my existing MSDN subscription I have been assigned as a Co-Administrator to my company's Azure account. When I log on to the management web portal everything looks fine. I can see both subscriptions and switch between them.

    However when I open Azure Powershell and use Add-AzureAccount to logon, it opens up the logon window, I enter my credentials, but then I get an error message in the PowerShell saying "Account1 ids do not match". We thought it is related to upper/lowercase in my Live ID - but moving everything to lower case didn't resolve the issue.

    After using Add-Azure account and getting the error described above, I tried using Get-AzureAccount. This shows my LiveID, but only with one subscription.

    Any advice?

     
    • Edited by C0mmander Tuesday, December 16, 2014 4:04 PM
    Tuesday, December 16, 2014 4:04 PM

Answers

  • Hi C0mmander,

    I think this is a known issue with version 0.8.12, when I was asking about the version earlier, I meant the module version for Microsoft Azure PowerShell?  To get this, use

    Get-Module Azure

    (or Get-Module AzureResourceManager if you are in resource manager mode).  If you are using version 0.8.12, then this is a known issue which has been fixed in source, but the fix has not been released yet.  You can temporarily get around the issue by downgrading to version 0.8.11 - just uninstall,  install from the previous msi:

    http://az412849.vo.msecnd.net/downloads03/azure-powershell.0.8.11.msi

    And run Clear-AzureProfile, then Add-AzureAccount to set up your accounts again.-Mark

    • Marked as answer by C0mmander Thursday, December 18, 2014 7:23 AM
    Wednesday, December 17, 2014 5:28 PM

All replies

  • Can you verify which version you are using?

    This does appear to be an issue with the capitalization of your user id (email) in that tenant.

    You should be able to correct this by changing the properties of the record of your ActiveDirectory guest account, through the portal.  We have also filed an issue to fix this on the PowerShell side.

    Tuesday, December 16, 2014 7:47 PM
  • PSVersion is:

    Name                           Value
    ----                           -----
    PSVersion                      4.0
    WSManStackVersion              3.0
    SerializationVersion           1.1.0.1
    CLRVersion                     4.0.30319.34014
    BuildVersion                   6.3.9600.17090
    PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}
    PSRemotingProtocolVersion      2.2

    "changing the properties of the record of your ActiveDirectory guest account, through the portal" -This does not resolve the issue:

    I entered the portal, opened the enterprise subscription, went to the list of administrators and changed everything to lower case. Still receiving the same Powershell error.

    AND in the portal on the upper right site I still see the username in different formats. When I open my MSDN subscription the username is still showing as "myname@something.com", but in the enterprise subscription it is showing as "MyName@something.com" (even after changing the capitalization in the administrator list)



    • Edited by C0mmander Wednesday, December 17, 2014 4:38 AM
    Wednesday, December 17, 2014 4:37 AM
  • Hi C0mmander,

    For your issue ,I suggest that you could try the following steps:

    Step1 :  please type the following command  in Azure PowerShell:

    Get-AzurePublishSettingsFile

    Since your account have two  subscriptions,you need to download the two separated  publishsettings files

    Step2:   please type the following command  in Azure PowerShell:

    Import-AzurePublishSettingsFile  my-subscription.publishsettings

    You need to import this command twice for each publishsettings

    Step3:   please type the following command  in Azure PowerShell:

    Get-AzureSubscription

    It will list all of the subscriptions that have been imported into PowerShell.

    Step4 : If you want to select specific subscription which you want to use ,please type the following command:

    Select-AzureSubscription -SubscriptionName "my-subscription"

     

    Best Regards,

    Kevin Shen.

    Wednesday, December 17, 2014 10:12 AM
  • I understand your response. But this is not what I'm looking for. There are two possiblities (for my understanding) on how to link the PowerShell to my Azure Account. One is by using the SettingsFile (as you described above). The other one is using the Add-AzureAccount command.

    For several reasons it is not applicable in my specific scenario to use the SettingsFile, but I have to use the Add-AzureAccount command. This is why I'm unfortunately not able to use the steps you provided.

    I think I somehow have to be able to reset the account name in the portal to lowercase and then connect with the Add-AzureAccount cmdlet.


    • Edited by C0mmander Wednesday, December 17, 2014 11:00 AM
    Wednesday, December 17, 2014 11:00 AM
  • Hi C0mmander,

    I think this is a known issue with version 0.8.12, when I was asking about the version earlier, I meant the module version for Microsoft Azure PowerShell?  To get this, use

    Get-Module Azure

    (or Get-Module AzureResourceManager if you are in resource manager mode).  If you are using version 0.8.12, then this is a known issue which has been fixed in source, but the fix has not been released yet.  You can temporarily get around the issue by downgrading to version 0.8.11 - just uninstall,  install from the previous msi:

    http://az412849.vo.msecnd.net/downloads03/azure-powershell.0.8.11.msi

    And run Clear-AzureProfile, then Add-AzureAccount to set up your accounts again.-Mark

    • Marked as answer by C0mmander Thursday, December 18, 2014 7:23 AM
    Wednesday, December 17, 2014 5:28 PM
  • Yes, I was using 0.8.12.

    Uninstalling this version and installing version 0.8.11 helped.

    Thanks!

    Thursday, December 18, 2014 7:23 AM