0

"Error":"Private key not found, please modify your selection."

I'm having an issue where I'm unable to download a cert with the private key. If I don't specify IncludePrivateKey it works, but if I set it to true I get the error in the title.

$Headers = @{"Content-Type" = "application/json"
"X-Venafi-Api-Key" = $resp.APIKey}
$uri = "https://certificateservices-test.us.com/vedsdk/Certificates/Retrieve"

$body = @{"CertificateDN" = "\\\\VED\\\\Policy\\\\System\\\\Certificates\\\\Systems\\\\server.server.com"
"Format" = "PKCS #12"
"IncludeChain" = "true"
"IncludePrivateKey" = "true"
"Password" = "password"
} | ConvertTo-Json

$resp1 = Invoke-restmethod -Method post -Uri $uri  -Body $body -Headers $Headers

 

3 comments

Please sign in to leave a comment.