Skip to content

SharePoint

  • SharePoint site access
  • Authentication cookies (FedAuth and rtFa)
  1. Log in to SharePoint in your browser
  2. Open browser developer tools (F12)
  3. Navigate to Application > Cookies
  4. Copy the values of FedAuth and rtFa cookies

Create a YAML file with the following fields:

FieldDescription
site_urlSharePoint site URL
fedauthFedAuth cookie value
rtfartFa cookie value
foldersList of folders to download

Example:

site_url: https://example.sharepoint.com/sites/MySite
fedauth: <FEDAUTH_COOKIE_VALUE>
rtfa: <RTFA_COOKIE_VALUE>
folders:
- /Shared Documents/Project A
- /Shared Documents/Project B/Data

See examples/sharepoint_download.yaml for a complete example.

Download all files:

Terminal window
python -m piccione.download.from_sharepoint config.yaml /output/directory

Discover folder structure only (no download):

Terminal window
python -m piccione.download.from_sharepoint config.yaml /output/directory --structure-only

Resume download using existing structure file:

Terminal window
python -m piccione.download.from_sharepoint config.yaml /output/directory --structure structure.json
ArgumentDescription
configPath to YAML configuration file
output_dirOutput directory
--structure-onlyOnly discover folder structure without downloading
--structurePath to existing structure.json file

The module creates a structure.json file containing the discovered folder structure. This file can be reused with --structure to skip the discovery phase on subsequent runs.

Existing files are automatically skipped during download.

  • Two-phase operation: discovery and download
  • Rate limiting with automatic retry
  • Skips existing files
  • Progress reporting with download statistics