Integrations
OneDrive
A OneDrive integration connects a Microsoft 365 drive to Mobius so agents 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 agent 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. A connection is one person's grant, so it stops working if that account is disabled. Connect it from an account that will outlast the work, and expect to reconnect after a staff change.
Connect OneDrive
| Surface | Support |
|---|---|
| App | Open Library > 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. |
{}Products that embed Mobius can add return_url and client_state to the
connect body. See embedded OAuth return.
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 agent.
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.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, and .put change the drive, and a retry can
repeat that. Have the agent open an
interaction before overwriting or deleting
anything in a shared 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 Library > 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.
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 agent
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 agent sees the current version rather than a
snapshot from delivery time.
Next
- Read the shared grant and disconnect rules in Microsoft integrations.
- Trigger work from a change with source events.
- Connect mail as well with Outlook.
- Store what the agent extracts in tables.