Azure Cloudtasks never finish, MissingRequiredQueryParameter api-version

David Garcia Accumatch 0 Reputation points
2025-06-05T18:08:46.9366667+00:00

I'm new to Azure Batch. Im following the samples listed in https://learn.microsoft.com/en-us/azure/batch/batch-apis-tools which recommended following repo https://github.com/Azure-Samples/azure-batch-samples I tried CSharp/GettingStarted/01_HelloWorld, whenAll always timeout, I tried debugging and following task url I see next error

I also tried another piece of code, I see the same error

https://stackoverflow.com/questions/79653646/azure-cloudtasks-never-finish-status-is-always-active

any ideas?

{
  "odata.metadata":"https://myaccount.westus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element","code":"MissingRequiredQueryParameter","message":{
    "lang":"en-US","value":"A query parameter that's mandatory for this request is not specified.\nRequestId:46af78ed-c0b2-4966-baef-4036e8480f12\nTime:2025-06-05T18:06:53.9784454Z"
  },"values":[
    {
      "key":"QueryParameterName","value":"api-version"
    }
  ]
}
Azure Batch
Azure Batch
An Azure service that provides cloud-scale job scheduling and compute management.
373 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Anusree Nashetty 4,275 Reputation points Microsoft External Staff Moderator
    2025-06-05T20:49:15.1266667+00:00

    Hi David Garcia Accumatch,

    The error you are seeing means that your request to the Azure Batch REST API is missing the required api-version query parameter. You're using an older version of the Azure Batch SDK. There's a mismatch between the SDK and REST API versions.User's image You mentioned you're running the C# sample from this repo. This sample uses the Azure.Batch SDK, which internally calls the REST API. But it might be using an outdated or incorrect SDK version, or the environment setup is missing configuration, causing this error when polling for task/job status.

    Make sure your Microsoft.Azure.Batch NuGet package is latest and is stable version.
    Check that your batch account and URLs are correct.
    Batch Service REST API Versioning

    For your reference: https://stackoverflow.com/questions/50413148/http-get-missingrequiredqueryparameter

    If you have any further queries, let me know. If the information is helpful, please click on Upvote.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.