title: Change User Name In Azure Active Directory
body: <p>I have an Azure Active Directory (AAD) set up in my Azure subscription associated with an email address of mine, which we'll call <code>A</code>.</p>
  
  <p>Some time later, I updated my Microsoft Account to use a new email address <code>B</code> as the primary email address, with <code>A</code> being associated with it still so it can still be used and the two email addresses treated as being one.</p>
  
  <p>In AAD there is one user, whose user Id is <code>A</code> which appears not to be able to be changed as it is greyed-out. Attempting to add <code>B</code> fails with the error: <strong>You cannot add yourself</strong>.</p>
  
  <p>Is there a way I can force the user name of the AAD user to be <code>B</code> instead of <code>A</code>?</p>
  
  <p>The reason I ask is because I am trying to setup an Azure Key Vault in my subscription as it appears to be failing because whether or not I sign in as <code>A</code> or <code>B</code> in Azure Powershell, I am always signed in as <code>B</code>. This then causes this error message, which I appear to be unable to work around:</p>
  
  <p><code>New-AzureKeyVault : Cannot find the Active Directory object 'B' in tenant
  '{Tenant Id}'. Please make sure that the user or application service principal you are
  authorizing is registered in the current subscription's Azure Active directory. The TenantID displayed by the cmdlet
  'get-AzureSubscription -current' is the current subscription's Azure Active directory.
  </code></p>