[BUG] Billing Role Assignment deserialization fails when createdByPrincipalTenantId is empty #47341
Labels
Billing
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Mgmt
This issue is related to a management-plane library.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Library name and version
Azure.ResourceManager.Billing 1.2.0
Describe the bug
When calling GetBillingProfileRoleAssignments().GetAllAsync() to list role assignments for a billing profile, we are observing in some environments an exception during this operation:
This occurs on this line in the SDK's deserialization of the
createdByPrincipalTenantId
property. It expects a GUID, but the value returned by API is actually an empty string in the failure scenario.Expected behavior
The operation should always succeed for normal requests to the Azure API. In the case of an empty string for
createdByPrincipalTenantId
, the operation should complete and the result should reflect the actual value (we don't have an opinion on whether this would be empty GUID, null, or otherwise).Actual behavior
System.FormatException
is thrown with messageOne of the identified items was in an invalid format.
Reproduction Steps
Query an environment where role assignments exist with empty
createdByPrincipalTenantId
value. Perform SDKGetAllAsync()
and observe the thrown exception.Environment
.NET 8
The text was updated successfully, but these errors were encountered: