Invalid api-version exception when submitting job to Data Lake Analytics using Azure .NET SDK

Bowen Yang 1 Reputation point
2022-06-09T15:05:06.32+00:00

I got below exception when I tried to submit a job to Azure Data Lake Analytics using .NET SDK

my code is like this:
var res = adlaJobClient.Job.Get(adlaAccountName, new Guid("cc75454e-5ab0-4cc0-84f0-35bd7b09b8a2"));

error msg:
Unhandled Exception: Microsoft.Rest.Azure.CloudException: api-version '2016-11-01' is invalid. Valid api-version: '2018-02-01-preview', '2017-09-01-preview'
at Microsoft.Azure.Management.DataLake.Analytics.JobOperations.<GetWithHttpMessagesAsync>d__10.MoveNext()

My Microsoft.Azure.Management.DataLake.Analytics version is 3.0.0
I tried to update it, but still not work.

I noticed there is a previous similar question, but the solution doesn't not work:
https://learn.microsoft.com/en-us/answers/questions/45857/invalid-api-version-exception-when-submitting-job.html

Azure Data Lake Analytics
{count} votes

2 answers

Sort by: Most helpful
  1. PRADEEPCHEEKATLA-MSFT 78,576 Reputation points Microsoft Employee
    2022-06-13T08:41:28.757+00:00

    Hello @Bowen Yang ,

    Thanks for the question and using MS Q&A platform.

    From the error message it looks like api-version '2016-11-01' is invalid.

    Make sure you have installed these packages via the NuGet command line with the following commands:

    Install-Package -Id Microsoft.Rest.ClientRuntime.Azure.Authentication  -Version 2.3.1  
    Install-Package -Id Microsoft.Azure.Management.DataLake.Analytics  -Version 3.0.0  
    Install-Package -Id Microsoft.Azure.Management.DataLake.Store  -Version 2.2.0  
    Install-Package -Id Microsoft.Azure.Management.ResourceManager  -Version 1.6.0-preview  
    Install-Package -Id Microsoft.Azure.Graph.RBAC -Version 3.4.0-preview  
    

    This article - Manage Azure Data Lake Analytics a .NET app describes how to manage Azure Data Lake Analytics accounts, data sources, users, and jobs using an app written using the Azure .NET SDK.

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators

  2. Jacob Teves 1 Reputation point
    2022-09-13T18:29:28.247+00:00

    This seems like a very big bug since there is no way to change the api-version that the api is pointing to, which prevents use of the data lake client at all... Github reference here: https://github.com/Azure/azure-sdk-for-net/issues/29569

    0 comments No comments