[BUG] Key Vault: Certificate appears to be serialized incorrectly
See original GitHub issueLibrary name and version
Azure.Security.KeyVault.Certificates Latest version
Describe the bug
When calling CertificateClient.CreateIssuerAsync with a specific OrganizationId in the CertificateIssuer class, the serializer incorrectly uses the AccountId instead of the OrganizationId.
From CertificateIssuer.cs:
if (!string.IsNullOrEmpty(OrganizationId)) { json.WriteString(s_organizationIdPropertyNameBytes, AccountId); }
When viewed in the Azure portal, the account ID shows up in the orginization ID field.
Expected behavior
The specified OrganizationId property value should be used instead of the AccountId property value.
Actual behavior
The AccountId property value is used for both AccountId and OrganizationId.
Reproduction Steps
Use the SDK to create a certificate issuer and verify that the specified organization ID is not used. Instead the account ID is used.
Environment
No response
Issue Analytics
- State:
- Created 6 months ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
We’re not sure exactly when the next beta will be, so I went ahead and released a patch: https://www.nuget.org/packages/Azure.Security.KeyVault.Certificates/4.5.1
Thanks again for finding this!
Fixed in #35254
@heaths Thanks so much for the quick turnaround on this. I think we can wait. We found the issue when writing some deployment code to set up our Azure Key Vault certificate issuer. But for now, we have the code using the “old” SDK. That should be fine until the update gets officially released.