title: Import-AzKeyVaultCertificate cmdlet results in: Key not valid for user in specified state
body: <p>I'm trying to import a .pfx certificate to an Azure keyvault but am having some issues.</p>
  
  <pre><code>Import-AzKeyVaultCertificate -VaultName "SecHash03" -Name "CodeSigning" -FilePath "\path\to\my\cert.pfx"
  </code></pre>
  
  <p>Results in: </p>
  
  <pre><code>Import-AzKeyVaultCertificate : Key not valid for use in specified state.
  At line:1 char:1
  + Import-AzKeyVaultCertificate -VaultName SecHash03 -Name " ...
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : CloseError: (:) [Import-AzKeyVaultCertificate], CryptographicException
      + FullyQualifiedErrorId : Microsoft.Azure.Commands.KeyVault.ImportAzureKeyVaultCertificate
  </code></pre>
  
  <p>I'm requesting this cert from an Enterprise CA using certreq from a machine in the same domain as the CA. There is no password required to import the cert. Plan was to then upload that cert to the aforementioned Azure keyvault. </p>
  
  <p>I tried using the Azure portal to import this cert and that works fine; import and usage both works well. So this is not an issue with Roles as suggested in another similar Stackoverflow answer (<a href="https://stackoverflow.com/questions/54460672/importing-certificate-to-azure-key-vault-key-not-valid-for-use-in-specified-sta">Importing certificate to Azure Key Vault: Key not valid for use in specified state</a>). </p>
  
  <p>Please advice!</p>