-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import-AzKeyVaultCertificate yields Cannot find the requested object #18494
Comments
@BethanyZhou , please help to look into this issue. |
Hi @cveld we want to know more about your scenario - were you importing a pre-created certificate to Azure KeyVault, or trying to create a new certificate in KeyVault? |
@isra-fel We pre-created it with the openssl tooling. New-Item -Path $OutputPath -ItemType Directory -Force
openssl genrsa -aes256 -passout pass:1234 -out $OutputPath\root.key.pem 2048
$here = Split-Path $MyInvocation.MyCommand.Path -Parent
$cnffile = Join-Path -Path $here -ChildPath "..\Configs\root-ca.cnf"
openssl req -new -x509 -config $cnffile -passin pass:1234 -key $OutputPath\root.key.pem -subj "/CN=My org" -days 3650 -sha256 -extensions v3_ca -out $OutputPath\root.cert.pem
openssl x509 -passin pass:1234 -noout -text -in $OutputPath\root.cert.pem
openssl pkcs8 -passin pass:1234 -nocrypt -in $OutputPath\root.key.pem -topk8 -out $OutputPath\root.pem
$from = Get-Content -Path $OutputPath\root.cert.pem
Add-Content -Path $OutputPath\root.pem -Value $from
|
Got it @cveld , thanks. @BethanyZhou is working on this. We are targeting the July 5th release. |
Description
When running the cmdlet
Import-AzKeyVaultCertificate
it yields the errorCannot find the requested object
.import-azkeyvaultcertificate -VaultName myvault -name examplecert -FilePath C:\temp\cert\examplecert.pem
I expect the certificate to be imported.
Interestingly when running the az cli counterpart, this runs fine:
az keyvault certificate import --vault-name myvault -n examplecert -f C:\temp\cert\examplecert.pem
Contents of examplecert.pem:
Issue script & Debug output
Environment data
Module versions
Error output
(what is the best way to suppress these TTY commands?)
The text was updated successfully, but these errors were encountered: