azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

New-AzureRmKeyVault gives the wrong user administrative access upon creation

Open VincentK76 opened this issue 10 years ago • 3 comments

Situation: I have a user account with UPN and email address [email protected] I have 8 service accounts that use my email address as a alternate email address.

When I create a vault with the cmdlet New-AzureRmKeyVault the output shows that one of the 8 service accounts got administrative access instead of myself. To make sure that I truly didn't get the administrative rights I tried to create a secret with the following command Set-AzureKeyVaultSecret. This resulted in the following error: Operation "set" is not allowed Trying to grant myself access with the cmdlet Set-AzureRmKeyVaultAccessPolicy results in a similar error message.

After investigation I noticed that the service account mentioned as administrator has my email address (UPN is the same) as an alternate email address. After changing this alternate email address to something else and recreating the Key Vault I got one of the other service accounts as administrator.

Only after changing all accounts that use my email address to a different email address the command selected me as the owner and gave me administrative access.

VincentK76 avatar Jul 01 '16 12:07 VincentK76

@RandalliLama @dragav would you mind taking a look? Is this still an issue?

cormacpayne avatar Mar 27 '18 22:03 cormacpayne

This was fixed by #4102

RandalliLama avatar Mar 28 '18 20:03 RandalliLama

@RandalliLama Awesome, thanks for the update, Rich. Closing.

cormacpayne avatar Mar 28 '18 21:03 cormacpayne