[BUG] UnsupportedRequestContent error response when using Azure.ResourceManager.Monitor to create AutoscaleSettingResource #43948
Labels
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
issue-addressed
The Azure SDK team member assisting with this issue believes it to be addressed and ready to close.
Mgmt
This issue is related to a management-plane library.
Monitor
Monitor, Monitor Ingestion, Monitor Query
needs-team-attention
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.Monitor 1.3.1, Azure.ResourceManager 1.11.1, Azure.Identity 1.11.2
Describe the bug
I'm trying to create a AutoScaleSetting for my already existing App Service plan using the .NET SDKs Azure.ResourceManager.Monitor and Azure.ResourceManager. I was able to create other resources like App service, Web App etc in the same Resource group successfully. I'm using the DefaultAzureCredential() and my own identity(I'm logged into visual studio, where this code is running as a console app) and I'm also owner of the subscription and Resource group and App service plan, for which I'm trying to create the AutoScale setting.
But I'm getting exception and exception details are: the 400 error response is not clear on what exactly is the error.
Below is the error response:
My code which I'm using to configure Autoscale setting resource is:
Expected behavior
400 error response should have a clear error message. Or the exception thrown by the .NET SDK should clear out what the user error is.
Actual behavior
Added exception message and x-ms-correlation id above.
Reproduction Steps
Have added code above. Use the code to repro.
Environment
OS Windows 11, Visual studio Enterprise 2022 (64-bit), version 17.9.6
The text was updated successfully, but these errors were encountered: