Closed chadduffey closed 3 years ago
I wondered if this is because the private key is on the HSM and so it can't be directly used for authentication? Or whether the Connect-AzAccount
works differently?
The reason we thought this might be useful for us is because we can't apply CAP to the Service Principal. One of the tenants I work with is in GovCloud, so even if the CAP issue is resolved, it'll be a little while till we see it in the GovCloud tenant.
I guess this case is not supported. I log a ticket to MSAL team. https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/2577
Thanks @chadduffey. I'm closing this issue. If you need further help, feel free to talk with us.
Description
When you attempt to use
Connect-AzAccount -ServicePrincipal -CertificateThumbprint $thumbprint_from_local_store
using a certificate that has it's private key on a (AWS cloud HSM) it returns
Connect-AzAccount : ClientCertificateCredential authentication failed: The certificate certificate does not have a private key.
Other Microsoft tools seem to be able to leverage the Cavium Key Storage Provider. For example:
certutil -store my
returnsEncryption test passed
Steps to reproduce
Environment data
Module versions
Error output