MemorySync
Integrations

OneDrive integration

Retrieve permitted Microsoft 365 files from the connected user’s OneDrive and accessible SharePoint libraries. Use extracted DOCX, PPTX, XLSX, and text content with stored visibility scope and per-drive incremental updates.

OneDrive and SharePoint coverage map

Connected user
OneDrive + accessible SharePoint libraries
Supported files
Outside this path: libraries and files the connected user cannot access

Supported Office and text formats

OneDrive and SharePoint

The connected user’s OneDrive and accessible SharePoint document libraries.

Office files

Text extraction from DOCX, PPTX, and XLSX files.

Text and visibility

Supported text extraction with stored visibility scope.

Understand visibility scope

Permission-aware retrieval
Discovery is limited to the connected user’s OneDrive and accessible SharePoint libraries. Retrieval must respect the stored visibility scope.

Connection readiness checklist

  • A Microsoft account with access to the intended OneDrive files or SharePoint libraries.
  • Permission to connect that user under your organization’s policy.
  • A MemorySync project for the imported Microsoft 365 knowledge.
Local planning guide
Plan your OneDrive import

Check items for your own planning. Nothing here changes a live connection.

0 of 4 planning steps complete

Per-drive delta timeline

  1. 1
    Discover accessible drives

    Use the connected user’s OneDrive and accessible SharePoint libraries.

  2. 2
    Extract supported content

    Process DOCX, PPTX, XLSX, and supported text.

  3. 3
    Apply per-drive deltas

    Track incremental changes independently for each drive.

Source deletion and derived memory purge

Deletion follows the source
Deleting a source file purges memories derived from that file.

Verify permission-aware retrieval

Query content from a known supported Office or text file, then confirm the result belongs to the intended drive and that your application honors its stored visibility scope.

Troubleshooting and related sources

Why is a SharePoint library missing?

Confirm the connected user can access the library and the intended documents.

Why is an Office file not searchable?

Verify that it is a supported DOCX, PPTX, XLSX, or text file with extractable content.

Why did content disappear after a source deletion?

Deleting a source file purges memories derived from that file.

Operations on this page

OperationMethod and pathPythonNode.js
Read OneDrive capabilitiesGET /api/v2/integrations/providers/onedriveproviders.getproviders.get
Start Microsoft OAuthPOST /api/v2/integrations/oauth/initiateconnections.oauth.initiateconnections.oauth.initiate
Confirm the connectionGET /api/v2/integrations/connections/{connection_id}connections.getconnections.get
Start synchronizationPOST /api/v2/integrations/connections/{connection_id}/syncconnections.trigger_syncconnections.triggerSync

Authentication and scope

RequirementContract
CredentialAn API key sent as X-API-Key. Connector operations are not end-user scoped.
Read scopeintegrations:read for every GET.
Write scopeintegrations:write for every POST, PUT, PATCH and DELETE.
TenantDerived from the authenticated key. There is no tenant parameter to pass or to get wrong.
X-End-User-IDNot used. A connection belongs to the organization, not to one end user.

1. Check OneDrive availability

Read the provider record before setup. The provider id is onedrive, even when your product labels the consent button Microsoft 365.

import os
from memorysync import MemorySyncClient
client = MemorySyncClient(
api_key=os.environ["MEMORYSYNC_API_KEY"],
base_url="https://api.memorysync.io",
)
provider = client.providers.get("onedrive")
print(provider["is_available"], provider["capabilities"])
GET/api/v2/integrations/providers/{provider_id}
200 OK

2. Authorize Microsoft access

Start OAuth and redirect the browser to the returned URL. The connected Microsoft account and granted scopes determine which drives and libraries can be discovered.

import os
from memorysync import MemorySyncClient
client = MemorySyncClient(
api_key=os.environ["MEMORYSYNC_API_KEY"],
base_url="https://api.memorysync.io",
)
result = client.connections.oauth.initiate(
"onedrive",
redirect_url="https://app.example.com/connections/callback",
)
print(result["authorization_url"], result["connection_id"])
POST/api/v2/integrations/oauth/initiate
200 OK

3. Confirm and sync

Confirm the connection before starting an incremental sync. Use the job response to follow progress instead of waiting on this request.

import os
from memorysync import MemorySyncClient
client = MemorySyncClient(
api_key=os.environ["MEMORYSYNC_API_KEY"],
base_url="https://api.memorysync.io",
)
connection = client.connections.get("conn_8f21a4")
if connection["status"] == "connected":
job = client.connections.trigger_sync("conn_8f21a4", job_type="incremental")
print(job["id"], job["status"])
Read one connection
GET/api/v2/integrations/connections/{connection_id}
200 OK
Start a sync
POST/api/v2/integrations/connections/{connection_id}/sync
202 Accepted

Errors and next action

StatusMeaningNext action
401Missing, malformed or inactive API key.Check server configuration without printing the key.
403The key lacks integrations:read or integrations:write.Grant the scope on the key, or use a key that has it.
404The connection, object or job is not visible to this tenant.Confirm the identifier belongs to this organization.
409The connection is in a state that forbids the operation.Read the connection status first and act on it.
429Rate limited, either by MemorySync or by the upstream provider.Back off; do not tighten a polling loop in response.
5xxService failure.Treat a write outcome as uncertain and reconcile by reading the connection back.
Was this page helpful?