question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] [Fix mentioned] [Easy fix] "ApplicationInsightsManagementClient.Workbooks" methods throw "InvalidApiVersionParameter"

See original GitHub issue

Library name and version

Microsoft.Azure.Management.ApplicationInsights v0.3.0-preview

Describe the bug

All these “Workbooks” methods throw “InvalidApiVersionParameter”:

  1. ListByResourceGroup + Async
  2. Get + Async

How to fix: Correct the URI in “https://github.com/Azure/azure-sdk-for-net/blob/4162f6fa2445b2127468b9cfd080f01c9da88eba/sdk/applicationinsights/Microsoft.Azure.Management.ApplicationInsights/src/Generated/WorkbooksOperations.cs” Lines: 145, 367, 575, 780, 1023

Actual: subscriptions/{subscriptionId}/resourceGroup/… Should be: subscriptions/{subscriptionId}/resourceGroups/… (Plural)

Expected behavior

Should return each workbook’s metadata.

Actual behavior

{“error”:{“code”:“InvalidApiVersionParameter”,“message”:“The api-version ‘2015-05-01’ is invalid. The supported versions are ‘2022-03-01-preview,2022-01-01,2021-04-01,2021-01-01,2020-10-01,2020-09-01,2020-08-01,2020-07-01,2020-06-01,2020-05-01,2020-01-01,2019-11-01,2019-10-01,2019-09-01,2019-08-01,2019-07-01,2019-06-01,2019-05-10,2019-05-01,2019-03-01,2018-11-01,2018-09-01,2018-08-01,2018-07-01,2018-06-01,2018-05-01,2018-02-01,2018-01-01,2017-12-01,2017-08-01,2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04’.”}}

Reproduction Steps

DefaultAzureCredential defaultCreds = new DefaultAzureCredential(new DefaultAzureCredentialOptions()); var token = defaultCreds.GetToken(new TokenRequestContext(new string[] { "https://management.azure.com" })); TokenCredentials tokenCreds = new TokenCredentials(token.Token); ApplicationInsightsManagementClient client = new ApplicationInsightsManagementClient(tokenCreds); client.SubscriptionId = "removed"; var test = client.Workbooks.ListByResourceGroup("removed", "removed") --> Throws “InvalidApiVersionParameter”

Environment

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jsquirecommented, May 12, 2022

Thank you for your feedback. Tagging and routing to the team member best able to assist.

0reactions
HarveyLinkcommented, Dec 20, 2022

Hi @arpitadessai Thank you for the feedback. Since our .NET Track1 SDK will get retired soon, all issues besides security effected ones won’t be fixed any more. I suggest you could move to our new .NET Track2 SDK: Azure.ResourceManager.ApplicationInsights

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found