0
votes

I'm trying to upload a document to a customer sharepoint site using the sharepoint client dll through c# code and the URL provided has 2 query strings indicating the target folder and authentication, which looks much like the following (not an actual URL):

https://customer-my.sharepoint.com/personal/_sub/11/guestaccess.aspx?folderid=25dcf7e97238cd2762906&authkey=Evk64AWEki7yGKft

Question being, how do I get the "folderid" and "authkey " key/value pairs added to the client object since I can only connect to the site using the URL string up to the "?" delimiter? I'm not finding anything obvious and googlefoo isn't bringing up anything useful either.

Using the full URL (including the query strings) doesn't work (unless there is something I'm missing).

1
Hey, welcome to SO. Would be nice to see some actual code, and what client do you use (is it from NuGet, or installed as a part of an SDK, version, and stuff). - vorou

1 Answers

0
votes

Shooting from the hip with an answer here, because it was awhile since I worked with this. There is a function in their API that you can call to use to prompt for or just enter some User Name and Password credentials. You can use that to send to the customers sharepoint server and you will get back a token for your authkey. Unfortunately, I don't know of a way you can 'cheat' the system here to get yourself an "authkey" without going through their system. The folderID can be attained by navigating through the file structure similarly with the API or this might be able to be cheated if you're going for a one time use scenario if you are able to find the folder you are targeting via another means.