Describe the bug
When I use RestApi or com.microsoft.azure:azure-keyvault SDK to get a certificate with a specific version, then the policy property won't return, but if I request without a specific version, then the policy property will return, is it by design? But I don't get the description from the document.
here is the RestApi result, SDK result is same.


Exception or Stack Trace
Return policy property when I get the specific version certification
the policy value in certificateBundle is null
Code Snippet
To Reproduce
CertificateBundle certificateBundle = keyVaultClient
.getCertificate(vaultBaseUrl, certificateName, certVersion);
if (certificateBundle == null) {
throw new CertificateException(String.format("Cannot find certificate, certificate name is %s, "
+ "url is %s, please check if the certificate exists.", certificateName, vaultBaseUrl));
}
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Setup (please complete the following information):
Additional context
Add any other context about the problem here.
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
@g2vinay @vcolin7 Can you help to check the problem?
Hi @zhoufenqin, thanks for creating this issue, I will look into it :)
Hi @zhoufenqin, thanks for creating this issue, I will look into it :)
Hi @vcolin7 thanks, Is it a bug? is so, we can temporarily solve the problem by getting the policy directly using keyVaultClient.getCertificatePolicy(vaultBaseUrl, certificateName) in our project, because we need to fix it ASAP, when you fix it, we can upgrade the SDK