1

I'm trying to pass credentials against a SharePoint site (It uses Windows Authentication). This is the code I'm using to do so,

SPServices.Lists sourceListService = new SPServices.Lists();
        System.Net.NetworkCredential networkCredentials = new System.Net.NetworkCredential("username", "password");
        sourceListService.Credentials = networkCredentials;

I would like to know how I can receive a response from this so that I can then use an If statement to check if the Username and Password entered in the Windows Form was accepted by the SharePoint site.

For example,

if (SPresponse = allowed)
        {
            Do something 
        }

1 Answer 1

0

I would send a POST to ../_api/contextinfo

If the credentials are valid, then the call will return a FormDigest, which you would likely need anyway.

1
  • Can you provide an example?
    – Prosperity
    Commented Aug 22, 2014 at 20:33

Your Answer

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

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