mercredi 28 septembre 2016

Access Sharepoint Docuemnts of logged-in user

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 I created an account there and can get the ClientContext like this

public void GetSharePointContext()
        using (ClientContext context = new ClientContext(""))
            context.Credentials = new NetworkCredential("", "somepassword", "");
            List list = context.Web.Lists.GetByTitle("Some List");

            // Now update the list.

Now I want to make user who logged into my app, can do 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 ''.

Please advice

Aucun commentaire:

Enregistrer un commentaire