title: Google account issue - Cannot write on the spreadsheet
body: <p>I m developing an App which has to write on google spreadsheet.
  My application used to work fine until Google changed is Auth API two months ago.
  Following the link with the new process.</p>
  
  <p><a href="https://stackoverflow.com/questions/30469058/google-gdata-client-gdatarequestexception-authentication-suddenly-fails-in-old">Google.GData.Client.GDataRequestException - Authentication suddenly fails in old code</a></p>
  
  <p>I have a google account me@company.com which is managed by my boss account company@gmail.com.</p>
  
  <p>I want to write in a spreadsheet named "Bank Details" shared to me from my boss account.(the onwer is "mycompany")</p>
  
  <p>I generated a key.p12 from my account and it works fine, I can write.</p>
  
  <p>Now the strange things is when i create a spreadsheet by myself (the owner is "me", my app doesn t find the file and return an error message.</p>
  
  <p>I generated a key.p12 from my boss account and it still doesn't find the spreadsheet created by my boss, so from his point of view the owner is "me".</p>
  
  <p>In conclusion:</p>
  
  <ul>
  <li>I find the spreadsheet shared by my boss with my key and I can write in it.</li>
  <li>I don't find the file created by me with my key.</li>
  <li>My app doesn't find the file created by my boss with his key.</li>
  </ul>
  
  <p>Here my code but i don't think the problem comes from here.</p>
  
  <pre><code> string keyFilePath;    // found in developer console
                  string serviceAccountEmail;
                  if (test == true) 
                  {
                      keyFilePath = @"C:\keyTEST.p12";
                      serviceAccountEmail = "me@developer.gserviceaccount.com";// found in developer console
                  }
                  else
                  {
                      keyFilePath = @"C:\key.p12";
                      serviceAccountEmail ="company@developer.gserviceaccount.com";
                  }
                  var certificate = new X509Certificate2(keyFilePath, "notasecret", X509KeyStorageFlags.Exportable);
  
                  ServiceAccountCredential credential = new ServiceAccountCredential(new ServiceAccountCredential.Initializer(serviceAccountEmail) //create credential using certificate
                  {
                      Scopes = new[] { "https://spreadsheets.google.com/feeds/" } //this scopr is for spreadsheets, check google scope FAQ for others
                  }.FromCertificate(certificate));
  
                  credential.RequestAccessTokenAsync(System.Threading.CancellationToken.None).Wait(); //request token
  
                  var requestFactory = new GDataRequestFactory("Some Name");
                  requestFactory.CustomHeaders.Add(string.Format("Authorization: Bearer {0}", credential.Token.AccessToken));
  
                  SpreadsheetsService myService = new SpreadsheetsService("Bank Details"); //create your old service
                  myService.RequestFactory = requestFactory; //add new request factory to your old service
                  myService.setUserCredentials(email, password);
  
  
  
                  // Instantiate a SpreadsheetQuery object to retrieve spreadsheets.
                  SpreadsheetQuery query = new SpreadsheetQuery();
  
                  // Make a request to the API and get all spreadsheets.
                  SpreadsheetFeed feed = myService.Query(query);
  
                  SpreadsheetEntry fileEntry = feed.Entries.Cast&lt;SpreadsheetEntry&gt;().FirstOrDefault(entry =&gt; entry.Title.Text == spreadSheetName);
                  SpreadsheetEntry spreadsheet = (SpreadsheetEntry)fileEntry;
  
                  if (feed.Entries.Count == 0)
                  {
                      Console.WriteLine("None");
                  }
  </code></pre>
  
  <p>...</p>