Overview
OneDrive for Business is Microsoft’s personal cloud storage for Microsoft 365 users. Datazone connects to one user’s OneDrive through Microsoft Graph with app-only (client credentials) access, and indexes the documents in it into a Vector.OneDrive sources hold documents, not tables. They are used by Vectors only — they have no extracts and no schema to infer.
Prerequisites
Create an app registration in Microsoft Entra ID and give it read access to files. See How to get the credentials below.Connection Parameters
Set on the source when you create it. Names match the API and CLI payload.string
required
Name — a unique identifier for your OneDrive source.
string
required
User — the sign-in email (user principal name) of the person whose OneDrive is indexed, for example
ayse@contoso.com.string
required
Tenant ID — the Directory (tenant) ID of the app registration.
string
required
Client ID — the Application (client) ID of the app registration.
string
required
Client Secret — the client secret value of the app registration. Stored encrypted.
How to get the credentials
1
Register an app
In the Azure portal, open Microsoft Entra ID → App registrations → New registration. Give it a name such as
datazone-onedrive and leave the defaults (single tenant).2
Copy the Tenant ID and Client ID
On the app’s Overview page, copy Directory (tenant) ID and Application (client) ID.
3
Create a client secret
Go to Certificates & secrets → New client secret, choose an expiry, and copy the Value immediately. It is shown only once. Use the Value, not the Secret ID.
4
Grant read permission
Go to API permissions → Add a permission → Microsoft Graph → Application permissions and add
Files.Read.All (or Sites.Read.All).5
Grant admin consent
Click Grant admin consent for <your tenant>. This needs a Global Administrator or Privileged Role Administrator. Without it, Datazone gets a
403 from Microsoft Graph.6
Note the user
Use the user’s sign-in email as
user_principal_name. The user needs a OneDrive for Business license, and must have signed in to OneDrive at least once so the drive exists.Using the source in a Vector
When you create a Vector, choose a connected source as the data source, then pick a path. The vector stores them assource and source_path, and both must be set together.
The path is a folder or file path from the root of the user’s OneDrive:
The path picker in the Datazone UI lets you browse the folders instead of typing the path.
Limitations
- One source connects to one user’s OneDrive. Create another source for each additional user.
- Subfolders are indexed recursively.
- Supported file types: PDF, CSV, DOCX, XLSX, XLS, MD, TXT. Other files are skipped.