SharePoint
Prerequisites
Section titled “Prerequisites”- SharePoint site access
- Authentication cookies (FedAuth and rtFa)
Obtaining authentication cookies
Section titled “Obtaining authentication cookies”- Log in to SharePoint in your browser
- Open browser developer tools (F12)
- Navigate to Application > Cookies
- Copy the values of
FedAuthandrtFacookies
Configuration
Section titled “Configuration”Create a YAML file with the following fields:
| Field | Description |
|---|---|
site_url | SharePoint site URL |
fedauth | FedAuth cookie value |
rtfa | rtFa cookie value |
folders | List of folders to download |
Example:
site_url: https://example.sharepoint.com/sites/MySitefedauth: <FEDAUTH_COOKIE_VALUE>rtfa: <RTFA_COOKIE_VALUE>folders: - /Shared Documents/Project A - /Shared Documents/Project B/DataSee examples/sharepoint_download.yaml for a complete example.
Download all files:
python -m piccione.download.from_sharepoint config.yaml /output/directoryDiscover folder structure only (no download):
python -m piccione.download.from_sharepoint config.yaml /output/directory --structure-onlyResume download using existing structure file:
python -m piccione.download.from_sharepoint config.yaml /output/directory --structure structure.jsonArguments
Section titled “Arguments”| Argument | Description |
|---|---|
config | Path to YAML configuration file |
output_dir | Output directory |
--structure-only | Only discover folder structure without downloading |
--structure | Path to existing structure.json file |
Output
Section titled “Output”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.
Features
Section titled “Features”- Two-phase operation: discovery and download
- Rate limiting with automatic retry
- Skips existing files
- Progress reporting with download statistics