none
How to Authenticate To Sharepoint Via Rest API RRS feed

  • Question

  • Hi,

    I am making an intra-net ASP .NET MVC site that access a Sharepoint installation via its REST API. Users are automatically logged into the ASP .NET site via Windows authentication.  Does anyone have any suggestions for how I can use the User.Identity object (an artifact of the Windows authentication) to authenticate with the Sharepoint site? The Authentication property on the Sharepoint data context seems to want a plain text user name and password.

    Thanks for any help.


    • Edited by MgSm88 Thursday, February 16, 2012 5:10 PM
    Thursday, February 16, 2012 5:09 PM

Answers

  • After some more searching, I found I could simply use CredentialCache.DefaultCredentials and pass that to Sharepoint via the service data context.
    • Marked as answer by MgSm88 Thursday, February 16, 2012 6:35 PM
    Thursday, February 16, 2012 6:35 PM