title: Embedded browser in sharing windows of Google Drive
body: <p>I am working on a desktop app using Google Drive SDK through OAuth2 authentication, and would like to share Google Drive files from my desktop app.  I have studied the "Share" feature in Google's official Google Drive desktop version, and found that it just simply loads the following url in an embedded webbrowser:   <a href="https://drive.google.com/sharing/share?shareUiType=default&amp;authuser=0&amp;foreignService=googledrivesync&amp;access_token=(Oauth2AccessToken)&amp;subapp=10&amp;shareProtocolVersion=2&amp;gaiaService=wise&amp;theme=2&amp;client=desktop&amp;command=settings&amp;hl=en_US&amp;popupWindowsEnabled=false&amp;id=(theFileId)" rel="nofollow">https://drive.google.com/sharing/share?shareUiType=default&amp;authuser=0&amp;foreignService=googledrivesync&amp;access_token=(Oauth2AccessToken)&amp;subapp=10&amp;shareProtocolVersion=2&amp;gaiaService=wise&amp;theme=2&amp;client=desktop&amp;command=settings&amp;hl=en_US&amp;popupWindowsEnabled=false&amp;id=(theFileId)</a> . </p>
  
  <p>After loading the url, the sharing web page will show up in the embedded IE browser. <strong>In Google Drive, no matter you have signed in Google or not in IE, the share function always works.</strong>  </p>
  
  <p>I employed the same url in my embedded webbrowser, and the sharing page shows up just as expected, but the actually sharing function only works when your have signed in Google in IE already. If your account is not in a Google signed-in status in IE, the sharing will not succeed. There is no problem for displaying the sharing page, but error message "<em>The server encountered an error. Please try again later.</em>" will be given when "Share" button is clicked. </p>
  
  <p>I have spent several days on this problem, using Fiddler to monitor the HTTP package, trying Firefox and Chrome instead of IE, modifing different setting in Google developer console... but still have no clue how Google Drive can successfully share files in its embedded IE browser without having to sign in first. </p>
  
  <p>NOTE: this is not an IE problem, same problem happends in Firefox and Chrome too.</p>
  
  <p>Any tip or trick is appreciated.</p>