title: How do I supply credentials to update my OneDrive file?
body: <p>I want to overwrite a file on my OneDrive.</p>
  
  <p>I think below is the correct method, but I don't see where I would provide my login credentals for my OneDrive account.</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using Microsoft.Live;
  using System.IO;
  using System.Threading.Tasks;
  
  
  
  namespace OneDriveUpdater
  {
      class Program
      {
          static void Main(string[] args)
          {   
  
              LiveConnectClient liveClient = new LiveConnectClient(this.session);
  
              FileStream fs = new StreamReader(@"c:\status.txt");
  
              var result = await liveConnectClient.UploadAsync("", "STATUS", fs, OverwriteOption.Overwrite);
  
  
          }      
  
      }
  }
  </code></pre>