Home > ASP.NET > Connecting to Windows Live

Connecting to Windows Live

There are not many posts on how to connect to Windows Live, this guide attempts to help users with this connection


  1. Have a valid domain name which you can manage
  2. Register a Windows Live application here
  3. Download code sample from here
  4. Update the following parameters inside web.config, taking the values from the Windows Azure summary page for the application
    <add key=”wll_appid” value=”[your appid]”/>
    <add key=”wll_secret” value=”[your secret key]”/>
    <add key=”wll_securityalgorithm” value=”wsignin1.0″/>
    <add key=”wll_returnurl” value=”[your return url]” />
    <add key=”wll_policyurl” value=”[url to your policy file]” />
  5. Browse to the domain to test (working sample can be found here)

Code run thru


  • this is the policy file which is required by windows life


  • This page handles the ‘login’, ‘logout’, ‘clearcookie’ and ‘delauth’ Web Authentication and Delegated Authentication actions. When you create a Windows Live application, you must specify the URL of this handler page.


  • this is where all the main action takes place
  • when you first access this page, you will see a sign in link, click on it to begin the sign in process to Windows Live.
  • Thereafter, Windows Live will redirect you to wlauth-handler.aspx which will then handle the login cookie, and redirect you back to default.aspx
  • Now you will see something likeNow this application knows that you are the user with ID = “xxxxx”. Please click here to grant consent so that we may access your Windows Live data
  • In order for the app to access your Live Data, you need to click on the “click here” link
  • Once that is done, you will see “We have found a consent token associated with your ID.”
  • Click on Show Me my Contacts for the app to query Windows Live for your contacts and display it out
Categories: ASP.NET
  1. Arif
    February 16, 2009 at 5:53 am

    What I was searching for!
    Thanks a lot.

    I woudner if you could do this a bit more advanced. Like using a Textbox to type email, and a “windows live login” pops up and you could type the password. Then the windows closes down and it gets the contacts. This pop up windows has been konfigured. it has the logo of the page. Cause it gets to many klicks.

    I have seen this in hi5, facebook. check it out. And check this out to: http://dev.live.com/blogs/devlive/archive/2009/02/11/470.aspx.

  2. Pete
    February 16, 2009 at 12:11 pm

    What I needed
    Thanks mate

  3. cittka
    February 16, 2009 at 9:08 pm


    There’s actually an updated Live SDK (you can get it from azure) but i’ve yet to fiddle with that. But using v1 of the Live SDK, its almost possible to do what you stated.

    You can see the code at http://nexus.nus.edu.sg/automate_contacts.aspx.

    I’ve also updated the sample.zip with the new files🙂

  4. Andre
    February 17, 2009 at 10:53 am

    This is greate
    Hi What is the download link to the latest Windows Live SDK??

  5. Arif
    February 17, 2009 at 11:00 am

    What do you mean with the files are updated?(in this blogg, with the new SDK)

    I can’t login to the page that you gave me. I need some kind Weblogin.

  6. cittka
    February 17, 2009 at 8:48 pm


    Apologies, the url is wrong, it should be http://nexus.nus.edu.sg/msn/automate_contacts.aspx


    The latest Windows Live SDK can be found at https://lx.azure.microsoft.com/Cloud/Default.aspx. You have to apply for the activation code first though, can’t remember where i got it from..

  7. Andre
    February 17, 2009 at 10:33 pm


    I could’t find the latest Windows Live sdk…

    Where can apply for it?

  8. Sam
    February 17, 2009 at 10:51 pm

    I would prefer something like Arif sad. a pop up instead (cause iam going to lose my customers). And it’s to many clicks to retrive the contatcs. People would’t like this.
    if you had the latest windows live sdk why didn’t you make something like facebook. or is it much more advanced.

    I don’t know why Windows Live made it so hard to code this. it is a fu*** api, it should be easy.

    if you have something like facebook. I would love to see it. and i would defenitvly implement it to my homepage.

    I wounder if you have Yahoo blogg with yahoo importer???

  9. cittka
    February 18, 2009 at 2:10 am

    Ok, here’s the steps to get access to Windows Live SDK
    1. Goto http://dev.live.com/resources/downloads.aspx, click on the Live SDK
    2. Follow the login to get into Windows Azure Site
    3. Goto http://dev.live.com/liveframework/sdk/
    4. Look for “While space is limited, you can request access to the CTP through our Microsoft Connect site.” and click on “Microsoft Connect”
    5. Once it is approved, you will get an email with the invitation token
    6. Goto your Azure account, click on the Account Tab and click on Token
    7. Enter the invitation token from your email
    8. Create a new project and select “Live Framework CTP”

    The links to the new Windows Live CTP is all there

  10. cittka
    February 18, 2009 at 2:16 am

    Hi Sam,

    Take a look at http://nexus.nus.edu.sg/msn/automate_contacts.aspx

    Note that there will never be a fully automated grab. Because
    1. User needs to login to Windows Live
    2. User needs to give consent to your site to access their contacts.

    So there will always be 2 screens where they need to perform neccessary actions. Other than that, the rest is pretty much automated

    Honestly i’m not much into facebook and hi5, but seeing the screenshots from http://dev.live.com/blogs/devlive/archive/2009/02/11/470.aspx, even they also cannot skip these 2 mandatory user input screens.

    Actually this is my first time developing for Windows Live, and so far its been pretty straightforward and the examples they have given are enough for me to work with, but well that’s my experience.

  11. Sam
    February 18, 2009 at 8:43 am

    hmm! Well What they do in the facebook. that you type emailaddress and then press a button.. it pops up a window and then you type the password.. Then you return to the page.. and then you get directed to a new page where the contacts is getting showed.. something like automated contacts. but this is with pop up.

    thanks a lot I will check the automated popup.

  12. Parmesh
    March 12, 2009 at 10:49 am


    Is it possible to test this applicatin in localhost ?


  13. cittka
    March 12, 2009 at 8:37 pm

    it used to be possible to test in localhost by just setting the domain to localhost, not sure if it still works now..

  14. Arun
    April 17, 2009 at 6:34 am

    When I tried
    string cts = (string)app[UserId];
    I am getting null in cts , so its not working? Any idea?

  15. cittka
    April 20, 2009 at 4:03 am

    Dear Arun,

    In order to figure out the cause of it, i need you to post the code which you are using. If its all done correctly, chances are you are not receiving the reply from live.com

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: