OneDrive
OneDrive connects OneDrive and SharePoint files so assistants can read, write, and react to changes.
A OneDrive integration connects a Microsoft 365 drive to Mobius so assistants can read a file, write one back, list or search a folder, share a link, and start work when a file changes. The same connection reaches every SharePoint document library the account can open, because Microsoft Graph treats a document library as just another drive.
Somebody drops a signed contract into Finance/Invoices. You want the assistant to
pick it up, pull the fields out, and add a row to a table. The file actions are
the reading part; the change event is what starts it without anyone asking.
For the Microsoft grant this shares with Outlook and Outlook Calendar, see Microsoft integrations.
Capability map
| Capability | Value |
|---|---|
| Provider ID | onedrive |
| Auth kind | oauth2_user |
| Connect flow | Microsoft sign-in |
| Actions | Yes |
| Events | Yes |
| Sync | Yes, subscription renewal and change sweeps |
| Webhook delivery | Yes, direct HTTPS from Microsoft Graph |
| Live status | Yes, drive subscription state |
App-only access is not available for OneDrive yet. Every call uses a delegated Microsoft account, so the connection stops working if that upstream account is disabled. For company work, choose an account that will outlast the project and expect to reconnect after a staff change.
Connect OneDrive
| Surface | Support |
|---|---|
| App | Open Build > Integrations, choose OneDrive, then click Continue with Microsoft. |
| CLI | The mobius CLI does not connect OneDrive integrations yet. Use the app or API. |
| API | Call POST /v1/integrations/providers/onedrive/connect with an empty body, then send the browser to the returned redirect_url. |
{}The connection finishes in Mobius for the person who started it. Returning the
browser to an embedded product is currently unavailable: a connect request that
includes return_url is refused with 400 embedded_return_disabled.
Account manager defaults to You. An organization administrator can choose Your team before sign-in, but OneDrive still acts as the Microsoft account selected on the account chooser. After connecting, open the account's Assistant access section and grant it to selected assistants.
A personal grant limits use of the drive and retention of its tool results to the manager's Mobius audience. A team-managed drive can be available to the team or named people. This result audience does not widen Microsoft access: the assistant can only reach files the signed-in account can already open.
Permissions
Mobius requests Files.ReadWrite.All plus openid, profile, and
offline_access. The file permission covers the connected person's OneDrive and
the SharePoint libraries they can already reach, which is what makes one
connection enough for both. It does not widen what that person can see: if they
cannot open a site, neither can the assistant.
A default-configured tenant asks an administrator to consent once for everyone. After that, each person connects with no further prompt.
Actions
onedrive.drive.list
onedrive.file.copy
onedrive.file.delete
onedrive.file.get
onedrive.file.list
onedrive.file.move
onedrive.file.put
onedrive.file.save
onedrive.file.search
onedrive.folder.create
onedrive.share_link.createEvery file action takes an optional drive ID, which is how a SharePoint document
library is addressed. Use onedrive.drive.list to find one rather than pasting
an ID from a URL.
onedrive.file.delete, .move, .put, .copy, folder creation, and share-link
creation change the drive. Mobius dispatches them without an automatic human
confirmation after rechecking the exact selected connection and grant. Use an
interaction when somebody should review the change, and use Microsoft-side
permissions when that review must be enforced independently of the assistant's
instructions.
Save and publish library files
onedrive.file.save downloads a complete file to the Mobius library. Supply
item_id or path, and drive_id for a SharePoint library or another drive.
Optional name and visibility control the library copy. The action is
available when library storage is configured.
The save ceiling is 25 MiB. Folders and oversized files are refused, never
truncated. The result includes artifact_id, artifact_ref, library_path,
document_readable, and existing. For a PDF or Office file, pass the artifact
ID to mobius.document.inspect, .read, or .search.
Saving the same source version and visibility again returns the existing copy
with existing: true. A changed version creates a new file. Deleting the library
copy lets a later save create it again. A personal connection defaults to
private; a team-managed connection defaults to organization. Explicit
visibility must fit the connection grant's permitted audience. A team connection
granted only for named people requires a private save or a broader grant.
Private copies stay separate by owner; team copies converge across team-managed
connections.
onedrive.file.put publishes an artifact_id to the path and drive you choose.
The assistant must be able to read that library file. Supply content instead
for inline bytes; the two inputs are mutually exclusive. Publishing accepts
files up to 100 MiB, using an upload session above 4 MiB. Chunks and
retries are bounded, and Mobius attempts to cancel an incomplete session after
failure. If the completion response is lost, check the destination before
retrying the entire publish.
conflict supports replace (default), rename, and fail. To update a file
in place, pass its etag from onedrive.file.get (or from the previous write)
as if_match. The write then succeeds only if nobody changed the file in the
meantime, and the file keeps its link and version history. Without if_match,
a replace does not check for changes since the last read.
OneDrive refuses writes, moves, and deletes while a file is open for editing in Word, Excel, or PowerPoint, or checked out in SharePoint. Microsoft does not show this lock before a write, so the assistant learns about it when the write fails. Nothing changes, and the assistant asks you to close the file, or to check it in if it is checked out, instead of writing a copy. An editing lock can last a few minutes after everyone closes the file. A check-out lasts until someone checks the file in.
The library details drawer shows where a saved file came from and the latest
20 successful artifact deliveries, with links. Failed uploads add no delivery.
A delivery_warning means the upload succeeded but its library record could
not be saved; use the returned remote file instead of automatically publishing
again. Saved files are copies: remote edits do not update them, and disconnecting
the account does not delete them from the library.
Events
onedrive.file.changedonedrive.file.changed fires once per changed file, keyed on the file's version
rather than its identity, so an edit produces an event and a re-delivery does
not. The payload names the file, its drive, and its path; read the contents
inside the turn with onedrive.file.get.
Warning: Microsoft delivers drive notifications on its own schedule. They are batched, and a change can take hours to reach Mobius. Use this event for work that can wait, and have a person ask directly when the answer is needed now.
Microsoft's notification says only that something in the drive changed, with no file in it, so Mobius then walks Microsoft's change list to work out which files moved. A very large first sweep drains across several passes rather than failing, so a freshly connected drive with thousands of files settles over a few minutes.
Choose the folder Mobius watches
A new connection watches the whole drive. Narrow it to one folder when only part of the drive is interesting.
- Open Build > Integrations, then choose OneDrive.
- In the Watched folder section, find the row for the drive you want.
- Type a path relative to the drive root, such as
Finance/Invoices, then click Save. Click Watch the whole drive to go back.
The same controls appear under Account settings beside a conversation's message box. Select the exact OneDrive account you manage, then check the saved path after Save. The path is relative to that account's current watched drive; this panel does not switch drives or SharePoint libraries. Changing a watch controls notifications, while Microsoft permissions and assistant account access still govern file reads.
From the API, call PUT /v1/integrations/providers/onedrive/watched-path:
{
"integration_id": "int_01J8...",
"path": "Finance/Invoices"
}An empty path means the whole drive. The folder filters the events Mobius
emits; it does not restrict what the file actions can reach, because an assistant
often needs to read a template that lives elsewhere.
Checkpoint: the connection's card shows the folder you chose, and a change
under it produces one onedrive.file.changed event.
Troubleshooting
A file changed but no event arrived yet
Wait. Microsoft batches drive notifications and can take hours. Mobius also sweeps for changes on its own every half hour, so an event that Microsoft never announced still arrives, late. Check source events before assuming the connection is broken.
Events stopped after a while
Open the Drive subscription status card on the provider page. A delegated subscription outlives the grant that created it and stops delivering when that grant goes stale, which reads as silence rather than an error. Reconnecting restores it.
A SharePoint library is not reachable
Confirm the connected account can open the site in a browser. The connection
carries that person's access and nothing more. If they can reach it, find the
drive with onedrive.drive.list and pass its ID to the action.
The event has no file contents
That is the contract. The event says which file changed; read it inside the turn
with onedrive.file.get so the assistant sees the current version rather than a
snapshot from delivery time.
Next
- Read the shared grant and disconnect rules in Microsoft integrations.
- Manage drive access in Connect accounts.
- Trigger work from a change with source events.
- Connect mail as well with Outlook.
- Store what the assistant extracts in tables.
A publish destination is recorded only when the connection permits that link to
be shown to the library file's audience. For example, publishing a team file
through a personal connection can succeed with delivery_warning and no saved
destination link. The returned remote file remains the successful result.