title: How to access Azure Webjobs log using C#
body: <p>I have a azure webjob running on a scheduled basis and I need to access the run logs and the output of each run.</p>
  
  <p>I bumped into kudu api, but couldn't go any further as I was not sure which credentials to pass with my web request.</p>
  
  <p>Sample Code:</p>
  
  <pre><code>private static void GetAPIData2()
      {
          String Url = "https://MyWebsite.scm.azurewebsites.net/azurejobs/api/jobs";
          WebRequest request = WebRequest.Create(Url);
  
          request.ContentType = "application/json";
          request.Method = "GET";
  
          //Your Azure FTP deployment credentials here
          request.Credentials = new NetworkCredential("What should go here?", "and here?");
  
          WebResponse response = request.GetResponse();
          Console.WriteLine(response.ToString());
      }
  </code></pre>
  
  <p>I get 401 Unauthorized if use my azure administrator account.</p>
  
  <p>What username and password should I use to authenticate?</p>