0

I have a MVC application where a list of users can upload files to GoogleDrive/DropBox and for this they just need to authenticate themselves and the corresponding api provides an ‘AccessToken’ or something which is further used to upload files to user account from my web application. Now I need to do same thing with Microsoft SharePoint. For testing purposes, I created an account there and can get the ClientContext like this:

public void GetSharePointContext()     
{         
using (ClientContext context = new ClientContext("https://test.sharepoint.com"))         {             
context.Credentials = new NetworkCredential("anil.dutt@test.onmicrosoft.com", "somepassword", "https://test.dev.com/");         
List list = context.Web.Lists.GetByTitle("Some List"); 
context.ExecuteQuery();              // Now update the list.
}     
}

Now I want to make user who logged into my app, achieve the same.

So in case of Microsoft Sharepoint what can I do to authenticate the logged in user on Sharepoint account and get his/her site url to get documents and perform upload/download etc.

For this i will open a sharepoint window where user will login but how to get Site URL like ‘https://test.sharepoint.com‘.

Please advice

(Visited 19 times, 1 visits today)
Add a Comment