Package to enable programmatic downloading of data from sharepoint.

Authenticates using pattern detailed

There is a package exists on github for managing lists - not clear whether this will work with downloading any data as package doesn’t work with most basic example of retrieveing all available lists


The authentication mechanism is subject to change.

spud will look for the environment variables SHAREPOINT_USERNAME and SHAREPOINT_PASS for your credentials and prompt interactively for any missing.

Once authenticated you can save your authentication data to disk for future sessions with:


(for a sharepoint object p saving to a file .auth). You can then use this by constructing your object as:

p <- spud::sharepoint$new(..., auth = ".auth")

Be sure to add this file your .gitignore and treat it like a password.


If using multi-factor authentication then the above approach won’t work. You need to generate an app password and enter this when prompted for your password. See microsoft docs for details on how to generate an app password.


Most of the tests make heavy use of mocks, so if the API changes we might not catch breaking changes. In order to hedge against this we run a small number of integration tests against sharepoint. To opt into running these tests you need to define some environment variables:

This will create a new directory on your sharepoint site below the path given at SPUD_TEST_SHAREPOINT_ROOT, one per time the test suite is run, and it will add, list, remove files that are there.


MIT © Imperial College of Science, Technology and Medicine