For the complete documentation index, see llms.txt. This page is also available as Markdown.

Microsoft OneDrive

Connect a OneDrive account (whole drive or one folder) to Datasaur to attach the drive to a knowledge base, which keeps its documents in sync on a schedule you set.

OneDrive external object storage is currently available only for LLM Labs.

Prerequisites

  • A Microsoft account (Personal) or a Microsoft 365 account (Business).

  • Permission to register an application in the Azure Portal, or an admin who can do it for you.

Setup

Step 1 — Register an Application

  1. Open the Azure Portal and go to Microsoft Entra ID.

  2. Select App registrations, then click New registration.

  3. Enter a Name, for example Datasaur OneDrive.

  4. Under Supported account types, choose Accounts in any organizational directory and personal Microsoft accounts if you are connecting a personal OneDrive. For Business only, the default single-tenant option works.

  5. Under Redirect URI, select Web and enter:

    On Datasaur Cloud, use https://llm.datasaur.ai/api/eos/authorization/onedrive. Self-hosted deployments must be served over HTTPS.

  6. Click Register.

  7. From the Overview blade, copy the Application (client) ID and the Directory (tenant) ID.

A single-tenant registration rejects personal Microsoft accounts at sign-in.

Step 2 — Add API Permissions

  1. Go to API permissions and click Add a permission.

  2. Select Microsoft Graph, then Delegated permissions.

  3. Add Files.Read.All, then click Add permissions.

  4. For a Business account, click Grant admin consent if your tenant requires it. Personal accounts consent at sign-in instead. After admin consent is granted, a white check mark with green background should appear in the status column.

Datasaur also requests openid, profile, and offline_access. You do not need to add these. Sites.Read.All is not needed — that is for the SharePoint integration.

Step 3 — Create a Client Secret

  1. Go to Certificates & secrets and click New client secret.

  2. Enter a description, choose an expiry, and click Add.

  3. Copy the secret's Value — not the Secret ID.

The Value is shown only once. Note the expiry date too: when the secret expires, the connection stops syncing.

Step 4 — Get the Folder URL (optional)

Leave this blank to connect your whole drive. To connect one folder, right-click it in OneDrive, select Share, and click Copy link.

The URL must point to a folder, not a file, and must belong to the account you sign in with. A Personal link will not work with a Business account, or the reverse. You can also paste a URL copied from the OneDrive address bar, but only if it contains an id= parameter. Without it, Datasaur connects your whole drive and gives no error. A SharePoint site URL is rejected. Use the SharePoint integration instead.

Account
Example

Personal

https://1drv.ms/f/c/xxxxxxxxxxxx/...

Business

https://contoso-my.sharepoint.com/:f:/g/personal/user_contoso_com/...

Step 5 — Connect OneDrive in LLM Labs

  1. Go to Settings > External object storage and click Add external object storage.

  2. Select OneDrive.

  3. Fill in the form:

    Field
    Required
    Notes

    Azure AD Application (client) ID

    Yes

    From Step 1.

    Client secret

    Yes, for a Web registration

    From Step 3.

    Tenant ID

    Only for single-tenant apps

    From Step 1.

    Folder URL

    No

    Blank connects your My files.

  4. Click Authorize

  5. Sign in with the Microsoft account that owns the drive and click Accept on the consent screen.

  6. You return to Datasaur. The connection is named after what it resolved to, such as (user@contoso.com) My files, or that name plus the folder path for a scoped connection. You can rename it.

Datasaur shows the consent screen every time you authorize, not only the first time.

Using the Connection

  1. Open a knowledge base, choose Connect object storage..., and pick your OneDrive connection.

  2. Set the sync rules and schedule, then click Connect object storage.

The connection syncs everything in scope by those rules. It is not a file-by-file picker. To change the rules later, use Edit rules or schedule... on the connected source, available once the knowledge base has been updated.

You can add several connections for different folders on the same drive. Renaming or moving a connected folder does not break the connection. Folders shared with you can be connected too.

Last updated