Skip to Content
DestinationsCloud StorageMicrosoft OneDrive

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

  1. In Zeotap, navigate to Destinations and click Add Destination
  2. Select Microsoft OneDrive from the Cloud Storage category
  3. Click Connect with Microsoft
  4. 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
  5. 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:

  1. In the Azure Portal , go to Azure Active Directory > App registrations > New registration
  2. Set the redirect URI to your Zeotap instance’s OAuth callback URL
  3. Under API permissions, add Microsoft Graph > Delegated permissions:
    • Files.ReadWrite.All
    • offline_access
  4. Under Certificates & secrets, create a new client secret
  5. Note the Application (client) ID and Client secret
  6. In Zeotap, configure the destination with your custom client ID and secret

Configuration

FieldTypeRequiredDescription
Drive IDTextNoThe OneDrive drive ID. Leave blank to use the authenticated user’s default drive. Useful for shared drives or SharePoint document libraries.
Folder PathTextYesThe folder path within OneDrive to write files to. Default: Zeotap. Created automatically if it does not exist.

Target Settings

FieldTypeRequiredDescription
File FormatSelectYesOutput file format: CSV or JSONL (Newline Delimited JSON). Default: CSV

Supported Operations

Sync Modes

ModeSupportedDescription
InsertYesWrite new files for each sync run
MirrorYesWrite the full current dataset as new files

Audience Sync Modes

ModeSupportedDescription
AddYesExport audience members as new files
MirrorYesExport 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:

  1. Data is serialized into the selected format (CSV or JSONL)
  2. Files are uploaded via the Microsoft Graph simple upload endpoint (PUT /drives/{id}/root:/{path}:/content)
  3. Files are organized by date: {folder_path}/{YYYY-MM-DD}/{batch_id}.{ext}
  4. 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/audiences or Zeotap/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.

Last updated on