0

I am creating an asymmetric key on the SQL Server database and have the SQL connector for Azure Key Vault installed and I am following the steps mentioned in the link setup steps for extensible key management using the azure key vault.

I am able to create CRYPTOGRAPHIC PROVIDER and credential, but when I try to create Asymmetric key using the below query, I get an error

 CREATE ASYMMETRIC KEY EKMASYKey
 FROM PROVIDER [KeyVault_EKM]
 WITH PROVIDER_KEY_NAME = 'CMKAuto1',
 CREATION_DISPOSITION = OPEN_EXISTING;

Below is the error I get

Cannot open session for cryptographic provider 'KeyVault_EKM'. Provider error code: 2050. (Provider Error - No explanation is available, consult EKM Provider for details)

I have seen similar questions Here and set up "SQL Server Cryptographic Provider" in registry and provided permissions to the service account under which SQL server is running (NT Service\MSSQLSERVER) with full control and have reviewed the permissions. but still get this error

Is there anything else I would need to setup that I am missing.

1 Answer 1

0

Is there anything else I would need to setup that I am missing.

Yes, the setup is incorrect, specifically on the create credential step where the client IDs are specified as the SECRET. This will result in the error 2050 as documented:

The secret string that is the concatenation of AAD client ID and secret is shorter than 32 characters.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.