I am trying to use the Batch service-defined environment variables, but I keep getting a null error. Similar to what I saw in the samples, I am trying to get the jobID for a job that I created through Azure portal as follows:
private readonly string jobID = Environment.GetEnvironmentVariable("AZ_BATCH_JOB_ID");
But jobID returns null. Why so? What am I missing here?
Thanks!