title: Why is SQL server unable to connect to Azure key vault using SQL Server connector
body: <p>I am trying to encrypt sql server database in Azure VM using TDE where the EKM will use Azure Key vault. I have been following the steps outlined in below link. </p>
  
  <p><a href="https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/setup-steps-for-extensible-key-management-using-the-azure-key-vault" rel="nofollow noreferrer">setup steps for EKM using Azure Key Vault </a></p>
  
  <p>I have followed all the steps exactly including the below step where we need to provide value for SECRET (Application ID without hyphens+ Azure vault key).</p>
  
  <pre><code>USE master;  
  CREATE CREDENTIAL sysadmin_ekm_cred   
      WITH IDENTITY = 'keyvaultname',  
      SECRET = 
   'ef509ab6e52649388e65283e9378b0a171ccf2d0a8004abbbaaf93ab8f5909c0'   
    FOR CRYPTOGRAPHIC PROVIDER AzureKeyVault_EKM_Prov; 
  </code></pre>
  
  <p>I get following error when trying to run below code</p>
  
  <pre><code>CREATE ASYMMETRIC KEY CONTOSO_KEY   
  FROM PROVIDER [AzureKeyVault_EKM_Prov]  
  WITH PROVIDER_KEY_NAME = 'Azurevaultkeyname',  
  CREATION_DISPOSITION = OPEN_EXISTING;
  </code></pre>
  
  <p>Msg 33028, Level 16, State 1, Line 14
  Cannot open session for cryptographic provider 'AzureKeyVault_EKM_Prov'. Provider error code: 3303. (Provider Error - No explanation is available, consult EKM Provider for details)</p>
  
  <p>Please let me know how to fix it.</p>