Invalid provider type specified. CryptographicException Invalid provider type specified. CryptographicException powershell powershell

Invalid provider type specified. CryptographicException


Microsoft support helped me out with this line

$myCertThumbprint = (New-SelfSignedCertificate -CertStoreLocation Cert:\CurrentUser\My-subject MyCert -KeyExportPolicy Exportable -NotAfter (Get-Date).AddYears(10) -Type CodeSigningCert -KeySpec Signature).Thumbprint

The AuthClientId and AuthCertThumbprint values I need for the HelloKeyVault app.config are created.

The AuthClientId displays in the portal as the Application ID and is vissible in the Registered app settings.

To get to it click Azure Active Directory -> App registrationsThen click View all applicationsclick on the application then settings

To see the Thumbprint doe the same and then click Keys

enter image description here

I can see AuthClientId


Please use this sample to learn how to use Key Vault with DotNet and authenticate to Azure Active Directory with a Service Principal's Certificatehttps://github.com/Azure-Samples/key-vault-dotnet-quickstart