I am following the article and sample that can be found in this address: http://msdn.microsoft.com/en-us/library/hh147177.aspx

Everything works fine but I need a more automated solution. The user shouldn't see the login popup, and my app must be able to login on behalf of the user without waiting for the popup.

I have two questions in this context:

  1. Can I fill the username and password input boxes in the web browser control automatically? And what do you think of using this system in a service architecture where a service logs in for the users? Using WebBrowser control in a WCF service method makes me nervous.

  2. Can I give up using WebBrowser control completely and code the login process with pure TCP Sockets? I know it's not possible with WebRequest classes because AFAIK HTTPOnly cookies cannot be retrieved with them.

Thanks in advance.

  • So here are my comments on my own question: 1-This is possible but I have to wait a few more seconds after DocumentCompleted event because Windows Live Services scripts run after the document is loaded and creates thousands of HtmlElements. 2-This is not possible. Answer lies in my first comment. Windows Live Services scripts creates thousands of elements and the worst of all it also creates login cookies dynamically. Not being able to log on to SharePoint online programmatically is a real pain for me right now. Jul 21, 2011 at 7:51
  • Start working on the similar problem (LiveID auth via SP2010). 2) If it's a desktop app it seems that your comments are right. I'm looking at WS-Federation specs now. Maybe it's possible to work around it. The second variant is to dig into OAuth 2.0 for Windows Live
    – AlexSSE
    Jul 29, 2011 at 8:17
  • If you come up with a solution, it will be greatly appreciated. Jul 29, 2011 at 8:19

1 Answer 1


What you are after is "Headless" authentication. Check out this blog post from CJ

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.