Forum Discussion

naveen73's avatar
naveen73
Copper Contributor
Feb 01, 2021

The name 'my-keyvault-NNN' is already in use

hi all,

 

I am doing Part - 6 of AZ 900 and trying to create a "Key Vault" and getting the following error message: "The name 'my-keyvault-NNN' is already in use, or is still being reserved by a vault which was previously soft deleted. Please use a different name."

 

I have look at the documentation: https://docs.microsoft.com/en-us/azure/key-vault/general/key-vault-recovery?tabs=azure-portal#list-recover-or-purge-a-soft-deleted-key-vault

 

However, when I am the step where it says: "Manage deleted key vaults", the concerning key vault cannot be found under the subscription.

 

Please can you help?

 

Thanks,

 

Naveen

6 Replies

  • orchee's avatar
    orchee
    Iron Contributor

    naveen73 So as Tommykobberoe said, you need global (!) unique name. I've created a quick powershell script to generate random 24 alfa-numeric string, if someone is so unlucky as I was with thinking of unique name.  :smile:

    https://gist.github.com/orchee/263679a3bae74d78edcafe3acbc8f115 


    • nitya041981's avatar
      nitya041981
      Copper Contributor
      Please can you suggest i am always getting same vault error. I never created any vault and if i try to give any any"Name your appliance" giving me same vault error. Dont know form where this vault error i am getting.

      When i try to list CLI vault list it shows empty.

      error:
      The vault name 'Assessment1578kv' is already in use.
      • orchee's avatar
        orchee
        Iron Contributor

        nitya041981 it does not matter if you have ever created vault. As mentioned before - these are global unique names. It has to be unique globally. Just use the PS script to generate random vault key name that I've provided.

  • SpitFire-666's avatar
    SpitFire-666
    Iron Contributor

    Had the same issue when trying to use "keyvault1" and "kv1". It worked with "testing1235134134"

     

     

     

     
    • Tommykobberoe's avatar
      Tommykobberoe
      MCT
      If you read the error message it does say that the name of the keyvault is globally unique, meaning the name you write can't be in use already by any Azure customer worldwide. Just like storage accounts
  • Ed_Pointer's avatar
    Ed_Pointer
    Copper Contributor

    I'm having the same issue when I'm trying to complete this sandbox

Resources