-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Description
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:
System.FormatException
One of the identified items was in an invalid format.
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 message One of the identified items was in an invalid format.
Reproduction Steps
Query an environment where role assignments exist with empty createdByPrincipalTenantId value. Perform SDK GetAllAsync() and observe the thrown exception.
Environment
.NET 8