Microsoft OneDrive
Write files to a Microsoft OneDrive folder in CSV or JSONL format. Use Zeotap to export audience lists, model results, or enriched data to OneDrive for downstream sharing and collaboration.
Prerequisites
- A Microsoft 365 account (personal, work, or school) with OneDrive access
- An Azure AD app registration with Files.ReadWrite.All and offline_access permissions, or consent to use Zeotap’s managed OAuth application
- The target OneDrive account must have sufficient storage quota for your exports
Authentication
Microsoft OneDrive uses OAuth 2.0 authentication via the Microsoft identity platform (Azure AD).
Setting Up OAuth 2.0
- In Zeotap, navigate to Destinations and click Add Destination
- Select Microsoft OneDrive from the Cloud Storage category
- Click Connect with Microsoft
- Sign in with your Microsoft account and grant the requested permissions:
- Files.ReadWrite.All — read and write files in all accessible drives
- offline_access — maintain access when you are not actively using the app
- After authorizing, you are redirected back to Zeotap with the connection established
Using a Custom Azure AD App
If your organization requires a custom app registration:
- In the Azure Portal , go to Azure Active Directory > App registrations > New registration
- Set the redirect URI to your Zeotap instance’s OAuth callback URL
- Under API permissions, add Microsoft Graph > Delegated permissions:
Files.ReadWrite.Alloffline_access
- Under Certificates & secrets, create a new client secret
- Note the Application (client) ID and Client secret
- In Zeotap, configure the destination with your custom client ID and secret
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
| Drive ID | Text | No | The OneDrive drive ID. Leave blank to use the authenticated user’s default drive. Useful for shared drives or SharePoint document libraries. |
| Folder Path | Text | Yes | The folder path within OneDrive to write files to. Default: Zeotap. Created automatically if it does not exist. |
Target Settings
| Field | Type | Required | Description |
|---|---|---|---|
| File Format | Select | Yes | Output file format: CSV or JSONL (Newline Delimited JSON). Default: CSV |
Supported Operations
Sync Modes
| Mode | Supported | Description |
|---|---|---|
| Insert | Yes | Write new files for each sync run |
| Mirror | Yes | Write the full current dataset as new files |
Audience Sync Modes
| Mode | Supported | Description |
|---|---|---|
| Add | Yes | Export audience members as new files |
| Mirror | Yes | Export full audience snapshot as new files |
Features
- Field Mapping: No — OneDrive writes all mapped fields as file columns
- Schema Introspection: No — OneDrive is a file-based destination without schema discovery
How It Works
Zeotap writes data as files to the configured OneDrive folder using the Microsoft Graph API:
- Data is serialized into the selected format (CSV or JSONL)
- Files are uploaded via the Microsoft Graph simple upload endpoint (
PUT /drives/{id}/root:/{path}:/content) - Files are organized by date:
{folder_path}/{YYYY-MM-DD}/{batch_id}.{ext} - Each sync run produces a new set of date-partitioned files
For Mirror mode, Zeotap writes the full current dataset as new files. Downstream consumers should use the latest date partition.
The simple upload endpoint supports files up to 250 MB, which is sufficient for typical audience and data exports.
Rate Limits
Microsoft Graph API enforces the following limits:
- Per-app, per-tenant: 10,000 requests per 10 minutes
- Per-user: 10,000 requests per 10 minutes
- File upload: 250 MB maximum per simple upload request
When Microsoft Graph returns HTTP 429, Zeotap surfaces the Retry-After hint in the batch error and the pipeline retries the sync on its next scheduled run. Tune your sync frequency to stay below the tenant and per-user quotas above.
Best Practices
- Use descriptive folder paths: Organize exports by purpose, e.g.,
Zeotap/audiencesorZeotap/model-results - Use CSV for spreadsheet workflows: CSV files open directly in Excel and other spreadsheet applications
- Use JSONL for data pipelines: JSONL preserves data types and nested structures better than CSV
- Monitor storage quota: Large or frequent exports may consume significant OneDrive storage
- Use a shared drive for team access: Set the Drive ID to a SharePoint document library or shared drive for team-wide access
Troubleshooting
Authentication failed
Verify that the OAuth connection is still valid. Microsoft access tokens expire after approximately 1 hour. If the refresh token has expired or been revoked, reconnect the destination by clicking Reconnect in the destination settings.
Insufficient permissions
Ensure the Azure AD app has the Files.ReadWrite.All delegated permission and that admin consent has been granted if required by your organization’s policies.
Folder not found or cannot be created
Check that the folder path uses forward slashes (/) and does not start with a leading slash. Zeotap creates the folder automatically on the first sync, but the authenticated user must have write permissions to the drive root.
File upload failed (HTTP 413)
The file exceeds the 250 MB simple upload limit. Reduce the batch size or split the sync into smaller segments.
Rate limited (HTTP 429)
Microsoft Graph is throttling requests. Zeotap automatically retries with backoff. If this persists, reduce sync frequency or contact your Microsoft 365 administrator to check tenant-level throttling policies.
Drive ID not found
If using a specific Drive ID, verify it is correct. You can find your Drive ID by calling the Microsoft Graph API endpoint GET https://graph.microsoft.com/v1.0/me/drives or checking the SharePoint site URL for document libraries.