title: Add-AzureAccount -credential not working as I'd hoped
body: <p>4 days ago (on 4th August 2014) there was a new release of Azure Powershell that included a new <strong>-Credential</strong> parameter on the Add-AzureAccount cmdlet. I'm trying to use it but I'm clearly doing something wrong.
  First I store my password in a file:</p>
  
  <pre><code>read-host -assecurestring | convertfrom-securestring | out-file C:\temp\securestring.txt
  </code></pre>
  
  <p>Then try and use it in Add-AzureAccount</p>
  
  <pre><code>$password = cat C:\temp\securestring.txt | convertto-securestring
  $username = "dhdom1\jamiet" #yes, this is the correct username
  $mycred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username,$password
  Add-AzureAccount -credential $mycred
  </code></pre>
  
  <p>The call to Add-AzureAccount fails:</p>
  
  <blockquote>
    <p>Add-AzureAccount : user_realm_discovery_failed: User realm discovery
    failed: The remote server returned an error: (404) Not Found.</p>
  </blockquote>
  
  <p>I know that "dhdom1\jamiet" is the correct account. Anyone any idea why this might be failing? TIA</p>