Monday, October 12, 2020

Error retrieving certificates from Azure Key Vault

When retrieving certificates from Azure Key Vault I get the following error in my .NET Core 3.1 app service.  The file is read from the Key Vault just fine, but throws an exception when converting the secret to a x509 certificate:

Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException at Internal.Cryptography.Pal.StorePal.FromBlobOrFile