OneDrive integration
In short
Browse, read, upload and share files, and work with Excel workbooks. Connect it on the Integrations page; your app then calls OneDrive through Sapilon without ever holding a Microsoft credential.
Lets your app browse and search the connected account’s OneDrive, download and upload files, create folders and sharing links, and read or update Excel workbooks stored there.
Connecting
On the Integrations page choose Connect on OneDrive, sign in to Microsoft and allow access. Under Advanced you can use your own Microsoft OAuth app instead of Sapilon’s.
- Your app can read and change every file in this OneDrive.
- Many Microsoft 365 organisations only let an admin approve new apps: if you see “Need admin approval”, ask your Microsoft 365 admin to consent once for the whole organisation.
- Sapilon’s Microsoft app is being registered. Until it is, Advanced → Bring your own OAuth app (an Entra app registration) connects today.
What your app can do
Only these requests are available; anything else is refused.
GET /me/driveGET /me/drive/root/childrenGET|PUT /me/drive/root:/**GET /me/drive/search*GET|PATCH /me/drive/items/*GET|POST /me/drive/items/*/childrenGET|PUT /me/drive/items/*/contentPOST /me/drive/items/*/createLinkGET|POST|PATCH /me/drive/items/*/workbook/**
How the agent uses it
Use integrations.request('onedrive', …); paths are relative to https://graph.microsoft.com/v1.0.
GET /me/drive,GET /me/drive/root/children.- By path:
GET /me/drive/root:/Reports/q3.pdf(metadata),GET|PUT /me/drive/root:/Reports/q3.pdf:/content(download or upload up to 4 MB). Example:{ method: 'PUT', path: '/me/drive/root:/Exports/orders.csv:/content', headers: { 'Content-Type': 'text/csv' }, body: csvText }. GET /me/drive/search(q='invoice').GET|PATCH /me/drive/items/{id}— metadata, rename or move.GET|POST /me/drive/items/{id}/children— list, or make a folder (body: { name: 'Exports', folder: {} }).GET|PUT /me/drive/items/{id}/content— a download answers 302: fetch theLocationwithout credentials.POST /me/drive/items/{id}/createLink—body: { type: 'view', scope: 'organization' }.- Excel:
/me/drive/items/{id}/workbook/worksheets,…/workbook/worksheets/Sheet1/range(address='A1:C10')(GET, PATCH{ values: [[…]] }),…/workbook/tables/Table1/rows(POST{ values: [[…]] }).
Deleting is not allowed.
More from Microsoft: https://learn.microsoft.com/graph/api/resources/onedrive