Connect SharePoint

SharePoint uses the same Microsoft sign-in as OneDrive, with different permissions and one extra field: the SharePoint Site URL, which tells Odoo which site’s files to sync.

Step 1: Register an app in Microsoft Entra

  1. Sign in to the Microsoft Entra admin center and browse to Microsoft Entra ID ‣ App registrations ‣ New registration.

  2. Give the app a name (e.g. Odoo Cloud Documents).

  3. Under Supported account types, choose who can use the app.

  4. Under Redirect URI, choose the Web platform. You fill in the value itself in Step 3.

  5. Select Register. The app’s own Overview page opens. Copy the Application (client) ID and the Directory (tenant) ID from there.

    Application (client) ID and Directory (tenant) ID on the app Overview page
  6. Open Manage ‣ Certificates & secrets ‣ New client secret, create a secret and copy its Value right away. It is shown only once.

    Client secret Value on the Certificates & secrets page
  7. Open Manage ‣ API permissions ‣ Add a permission ‣ Microsoft Graph ‣ Delegated permissions and add:

    offline_access, Sites.ReadWrite.All, Files.ReadWrite.All
    
    Microsoft Graph delegated permissions on the API permissions page

Tip

The Required Permissions field shows the permissions needed. If any permission is missing after sign-in, the provider will not connect.

Note

You can reuse one app registration for both OneDrive and SharePoint. It then needs the permissions of both: offline_access, Files.ReadWrite.All, User.Read and Sites.ReadWrite.All.

Step 2: Create the provider in Odoo

  1. Navigate to Cloud Storage ‣ Configuration ‣ Connections ‣ Providers and click New.

  2. Set a friendly Name (e.g. Company SharePoint) and choose SharePoint as the Provider Type.

  3. Open the Credentials tab and fill in:

    • Directory (Tenant) ID: the tenant ID from Step 1.

    • Client ID and Client Secret: from your app registration.

    • SharePoint Site URL: the site whose files should be synced, e.g. https://contoso.sharepoint.com/sites/YourSite.

  4. Save the record. The status bar stays on Not Connected until you finish Step 4.

Step 3: Redirect URI

  1. Copy the Redirect URI from the provider form with the clipboard icon.

  2. In your app registration under Manage ‣ Authentication (Preview), add it as a Web platform redirect URI and click Save.

    Adding a Web platform redirect URI in the Microsoft Entra app registration

Warning

Paste the exact value, with no trailing slash, before Step 4. A mismatch is the most common cause of a failed sign-in.

Step 4: Connect and test

  1. On the Credentials tab, click Generate Access Token. Odoo saves the Client ID and Client Secret, then sends you to the Microsoft sign-in page.

    Generate Access Token on the Credentials tab of the SharePoint provider
  2. Sign in with an account that can reach the site, then review the permissions and click Accept.

  3. Microsoft sends you back to the provider form and Odoo stores the access token. The Connect and Test Connection buttons now appear in the header.

    Connect and Test Connection buttons on the SharePoint provider form
  4. Click Test Connection and verify that the success message appears.

  5. Click Connect to activate the provider. The status moves from Not Connected to Connected.

Note

The site ID is looked up once from the SharePoint Site URL and remembered. If you change the URL later, the site ID and the change cursor are cleared, so the sync starts fresh for the new site.

Step 5: Webhook Configurations

  • What webhooks do

    • Webhooks allow SharePoint to instantly inform Odoo when something happens on the site (a file or folder added, renamed, moved, or deleted).

    • This means Odoo updates automatically without waiting for the scheduled actions.

    • It helps keep your documents in sync in real time.

  • How to enable or disable

    1. Open your SharePoint provider.

    2. Open the Webhook tab. It is visible to Cloud Documents Administrators only.

    3. Enable Active on the event lines you want, and save.

SharePoint webhook events on the provider form

Webhook Event Types

  • Create/Update Record

    • Triggered when a file or folder is added or modified in SharePoint.

    • Odoo automatically creates or updates the matching document or directory.

  • Delete Record

    • Triggered when a file or folder is deleted in SharePoint.

    • Odoo removes the matching document or directory.

Note

  • Your Odoo URL must use https://. Webhooks will not work on localhost or an intranet.

  • The provider must be in Connected state.