[Integration] Map & test OneDrive document storage integration #39

Open
opened 2026-03-23 09:35:49 -07:00 by pyr0ball · 0 comments
Owner

OneDrive — Resume & Cover Letter Storage (Microsoft 365 users)

Save cover letters and PDFs to OneDrive for users in the Microsoft 365 ecosystem.

Current state

scripts/integrations/onedrive.py exists (33 lines, 4 methods).

Tasks

Mapping

  • Document credential options: Microsoft Graph API (OAuth2 with delegated permissions)
  • Required scopes: Files.ReadWrite.AppFolder or Files.ReadWrite
  • Decide: use App Folder (sandboxed, simpler) or user-chosen folder?
  • Config: config/integrations/onedrive.yaml

Implementation

  • Implement OneDriveIntegration.connect() — store OAuth2 credentials
  • Implement OneDriveIntegration.test() — GET drive root to validate token
  • Implement OneDriveIntegration.upload(path, content_bytes) — PUT via Graph API
  • Handle Microsoft OAuth token refresh (tokens expire in 1 hour)

Testing

  • Integration test: upload test file via Graph API
  • Test token refresh logic
  • Test with both personal (consumer) and work/school (AAD) accounts

Acceptance criteria

  • Settings → Integrations shows OneDrive card
  • Supports both personal Microsoft accounts and Microsoft 365 work accounts
  • PDF upload to OneDrive after generation
## OneDrive — Resume & Cover Letter Storage (Microsoft 365 users) Save cover letters and PDFs to OneDrive for users in the Microsoft 365 ecosystem. ### Current state `scripts/integrations/onedrive.py` exists (33 lines, 4 methods). ### Tasks **Mapping** - [ ] Document credential options: Microsoft Graph API (OAuth2 with delegated permissions) - [ ] Required scopes: `Files.ReadWrite.AppFolder` or `Files.ReadWrite` - [ ] Decide: use App Folder (sandboxed, simpler) or user-chosen folder? - [ ] Config: `config/integrations/onedrive.yaml` **Implementation** - [ ] Implement `OneDriveIntegration.connect()` — store OAuth2 credentials - [ ] Implement `OneDriveIntegration.test()` — GET drive root to validate token - [ ] Implement `OneDriveIntegration.upload(path, content_bytes)` — PUT via Graph API - [ ] Handle Microsoft OAuth token refresh (tokens expire in 1 hour) **Testing** - [ ] Integration test: upload test file via Graph API - [ ] Test token refresh logic - [ ] Test with both personal (consumer) and work/school (AAD) accounts ### Acceptance criteria - Settings → Integrations shows OneDrive card - Supports both personal Microsoft accounts and Microsoft 365 work accounts - PDF upload to OneDrive after generation
pyr0ball added this to the Paid Tier GA milestone 2026-03-23 09:35:49 -07:00
pyr0ball added the
feature-request
label 2026-03-23 09:35:49 -07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/peregrine#39
No description provided.