Configuration
Every setting in SharePoint Document Filing, and what each one changes.
Start simulated
Microsoft 365 > Configuration > Accounts
A new account uses the simulated transport. Leave it there and set up your rules first: every attachment is recorded with the folder it would land in, and nothing is sent. Look at the list, adjust, and only then go and ask for an app registration.
The Entra app registration
When you are ready:
- In Microsoft Entra > App registrations, create an application.
- Under API permissions, add Microsoft Graph application permission Files.ReadWrite.All or Sites.ReadWrite.All, and grant admin consent.
- Under Certificates & secrets, create a client secret and copy its value - Microsoft shows it once.
Application permissions with client credentials, rather than delegated, so a nightly filing job does not depend on somebody being signed in.
The account
| Field | What it is |
|---|---|
| Transport | Simulated, or Microsoft Graph |
| Directory (tenant) ID | From the app registration overview |
| Application (client) ID | From the same page |
| Client secret | Set with the button. Stored encrypted, never shown again |
| Document library | The Graph drive id. Use Choose a library to list what the app can see |
| Timeout | Seconds to wait for Microsoft |
Test connection proves the credentials work and names the library.
Filing rules
Microsoft 365 > Configuration > Filing Rules
One rule per model. Nothing is filed until a rule exists.
| Field | What it does |
|---|---|
| Attachments on | The model whose attachments are filed |
| Folder | Where they land, relative to the library root |
| Only these types | Comma-separated. A trailing slash matches a family: image/ |
| Only files larger than | In bytes. Filing a 2 KB signature image costs more than storing it |
| Remove the Odoo copy once filed | Off by default. See below |
Folder templates
Odoo/{model}/{year}/{record} produces Odoo/Invoice/2026/INV-2026-0042/contract.pdf.
Placeholders: {model} {record} {year} {month} {day} {company}. A typo is refused when you save, not discovered three months later as a folder called {yaer}.
Every segment is sanitised, because a record's name is user input and SharePoint refuses characters Odoo allows - the slash most of all.
Removing the Odoo copy
This is what reclaims the filestore, and it means the document then exists in exactly one place. The copy is removed only when Microsoft has returned an item id and a link - never on a call that merely did not error.
Turn it on per rule, once you trust the filing.
What is never filed
- Odoo's own machinery: views, assets, report attachments
- Attachments backing a binary field - a product image, a company logo - because moving them breaks the field