Click here to Skip to main content
15,890,579 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello together,
I have got a question about OneDrive's LiveSDK.
I want to find a way how to sign in a user without using login informations (e-mail and password), and nothing to accept, because my service should automatically sign in the user in the background, so that he can't see anything. So the only way I know to create a session is to obtain an authorize code, and in the documentations it says that when requesting an authorize code the user has to sign in and a window will pop up. But this is exactly what I not want to have.
So I hope you may be able to help me and hopefully have a solution for my problem.
Here the code i used to get an authorize code, there should be an URL as a result with the authorize code, but i get a huge html code.
C#
Uri url = new Uri("https://login.live.com/oauth20_authorize.srf");

            using (var wb = new WebClient())
            {
                var data = new NameValueCollection();
                data["client_id"] = "client_id";
                data["scope"] = "wl.signin%20wl.basic%20wl.offline_access";
                data["response_type"] = "token";
                data["redirect_uri"] = "redirect_uri";       //bekomme ich zurück? als response

                var response = wb.UploadValues(url, "GET", data);

                
                string a = System.Text.Encoding.UTF8.GetString(response);
Posted
Updated 11-Nov-14 0:58am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900