How to Authenticate Sharepoint ?

francis92francis92 USMember ✭✭
edited July 15 in General

Hi ,

How to authenticate Sharepoint by Form Based Authentication and Windows Authentication in Xamarin.Android and Xamarin.iOS?

** Managed to authenticate via Windows Authentication only.** .

 client.Headers.Add("X-FORMS_BASED_AUTH_ACCEPTED", "f");
                    client.Credentials = new NetworkCredential(text1, text2);
                    client.Headers.Add(HttpRequestHeader.ContentType, "application/json;odata=verbose");
                    client.Headers.Add(HttpRequestHeader.Accept, "application/json;odata=verbose");
                    var endpointUri = new Uri(currentuser);

                    string result = client.DownloadString(endpointUri);

                    dynamic obj = JObject.Parse(result);

                    var d = obj["d"];
                    var results = d["Title"];
Sign In or Register to comment.