MS365Sync
Sync files between Microsoft 365 SharePoint and your local machine with permission tracking.
What it does
- Downloads files from SharePoint document libraries to local folders
- Tracks file permissions and detects changes
- Syncs only when files are modified (smart sync)
- Works via command line or Python code
Quick Start
1. Install
pip install ms365sync
2. Setup Azure App
- Go to Azure Portal → Azure Active Directory → App registrations
- Create new app registration
- Add these API permissions:
Sites.Read.All,Files.Read.All(Application permissions) - Create a client secret
- Grant admin consent
3. Configure
Create a .env file:
TENANT_ID=your-azure-tenant-id
CLIENT_ID=your-azure-client-id
CLIENT_SECRET=your-azure-client-secret
4. Use it
Command line:
ms365sync \
--sharepoint-host "yourcompany.sharepoint.com" \
--site-name "Your Site Name" \
--doc-library "Documents"
Python code:
from ms365sync import SharePointSync
sync = SharePointSync(
sharepoint_host="yourcompany.sharepoint.com",
site_name="Your Site Name",
doc_library="Documents"
)
changes = sync.sync()
print(f"Synced {changes['total_files']} files")
What you get
After running sync:
├── data/ # Your SharePoint files
└── .permissions.json # Permission tracking
sync_logs/ # Sync operation logs
Need help?
- Check the
examples/folder for more usage patterns - Report issues: GitHub Issues
- Email: aiteam@phianalytica.com
Metadata
Release files for ms365sync 0.3.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ms365sync-0.3.4.tar.gz | 18.9 kB | Without provenance | Details for ms365sync-0.3.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ms365sync-0.3.4-py3-none-any.whl | Python 3 | none | any | Details for ms365sync-0.3.4-py3-none-any.whl |
Total release size: 30.0 kB
Release files / ms365sync-0.3.4.tar.gz
| Download URL | ms365sync-0.3.4.tar.gz |
|---|---|
| Size | 18.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
70ced71a92e9dc3af716f2582c6589533fd8eaed37b94d27e5c747798fcc8c55
|
|
BLAKE2b-256 checksum How to use checksums |
22973b7c7a31b067f530c4b733550563f4243a38cb11789ef53a48a64768808e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Release files / ms365sync-0.3.4-py3-none-any.whl
| Download URL | ms365sync-0.3.4-py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9376e2db7a4c493dbedef3ac38c15a281330829f8a6b6790422e2a9c8ad1fa24
|
|
BLAKE2b-256 checksum How to use checksums |
9e9c0702290088a8611c2815e1abebe5992e7e6fd58552553b75fcbee491bed5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Security for ms365sync 0.3.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.