-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to list billing accounts using the Azure SDK for python #39933
Comments
Hi @juniinacio, could you share the log of this script (following https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/debug_guide.md)? We need to see how the date shows like in the service response. |
@ChenxiJiang333 You can already see the date in the issue under Screenshots section (I have make it bold, it is the start and end dates for the enrollment details of the billing account). But in either case I have also added the logger configuration you requested and I don't see a difference in what I have already provided and what the new logger configuration gives. But in either case I have added the full log trace:
|
@juniinacio my bad for not noticing that. Since it's a service behavior that sdk team cannot make any change on it, I have opened an issue to get service attention. Please follow Azure/azure-rest-api-specs#33009 to get support. |
@ChenxiJiang333 thanks for your reply, I will keep an eye on that thread. |
Describe the bug
Unable to list billing accounts using the Azure SDK for python. When using the SDK to list billing accounts one has access to the SDK raises an exception:
azure.core.exceptions.DeserializationError: Unable to deserialize response data.
I suspect that the SDK is expecting the dates in the response to be in the ISO 8601 format but Azure response (in my case) with date in another format.
To Reproduce
Steps to reproduce the behavior:
Login with Azure CLI with an account that has permissions to one or more billing accounts. (Alternatively one can also change the script to use ClientSecretCredential)
Execute the script.
Expected behavior
The SDK should lists all billing accounts I have access to.
Screenshots
Error details:
azure.core.exceptions.DeserializationError: Unable to deserialize response data. Data: [{'id': '/providers/Microsoft.Billing/billingAccounts/XXXXXXXX', 'name': 'XXXXXXXX', 'properties': {'accountStatus': 'Extended', 'accountType': 'Enterprise', 'accountSubType': 'Other', 'agreementType': 'EnterpriseAgreement', 'displayName': 'XXXXXXXX', 'enrollmentDetails': {'startDate': '3/31/2015 12:00:00 AM +00:00', 'endDate': '3/31/2018 12:00:00 AM +00:00', 'currency': 'EUR', 'channel': 'EaDirect', 'language': 'nl', 'countryCode': 'NL ', 'billingCycle': 'Quarterly', 'extendedTermOption': 'Other', 'supportLevel': 'Other'}, 'hasReadAccess': True, 'soldTo': {'companyName': 'XXXXX', 'country': 'NL ', 'isValidAddress': True}}, 'type': 'Microsoft.Billing/billingAccounts'}, {'id': '/providers/Microsoft.Billing/billingAccounts/bbbbbbbbbb', 'name': 'bbbbbbbbbb', 'properties': {'accountStatus': 'Active', 'accountType': 'Individual', 'accountSubType': 'Other', 'agreementType': 'MicrosoftOnlineServicesProgram', 'displayName': 'bbbbb', 'hasReadAccess': True, 'notificationEmailAddress': '[email protected]', 'primaryBillingTenantId': 'bbbbbb', 'soldTo': {'addressLine3': '', 'companyName': 'bbbbb', 'country': 'NL', 'firstName': 'bbbb', 'lastName': 'bbbbb', 'phoneNumber': 'bbbbb', 'isValidAddress': True}}, 'type': 'Microsoft.Billing/billingAccounts'}], [BillingAccount]
Additional context
None.
The text was updated successfully, but these errors were encountered: