Microsoft OneDrive
This page contains the setup guide and reference information for the Microsoft OneDrive source connector.
Requirements
- Application (client) ID
- Directory (tenant) ID
- Drive name
- Folder Path
- Client secrets
Setup guide
For Airbyte Cloud:
- Navigate to the Airbyte Open Source dashboard.
- Click Sources and then click + New source.
- On the Set up the source page, select Microsoft OneDrive from the Source type dropdown.
- Enter the name for the Microsoft OneDrive connector.
- Enter Drive Name. To find your drive name go to settings and at the top of setting menu you can find the name of your drive.
- Enter Folder Path.
- The OAuth2.0 authorization method is selected by default. Click Authenticate your Microsoft OneDrive account. Log in and authorize your Microsoft account.
- For Start Date, enter the date in YYYY-MM-DD format. The data added on and after this date will be replicated.
- Add a stream:
- Write the File Type
- In the Format box, use the dropdown menu to select the format of the files you'd like to replicate. The supported formats are CSV, Parquet, Avro and JSONL. Toggling the Optional fields button within the Format box will allow you to enter additional configurations based on the selected format. For a detailed breakdown of these settings, refer to the File Format section below.
- Give a Name to the stream
- (Optional) - If you want to enforce a specific schema, you can enter a Input schema. By default, this value is set to
{}
and will automatically infer the schema from the file(s) you are replicating. For details on providing a custom schema, refer to the User Schema section. - Optionally, enter the Globs which dictates which files to be synced. This is a regular expression that allows Airbyte to pattern match the specific files to replicate. If you are replicating all the files within your bucket, use
**
as the pattern. For more precise pattern matching options, refer to the Path Patterns section below.
- Click Set up source
For Airbyte Open Source:
Step 1: Set up OneDrive application
The Microsoft Graph API uses OAuth for authentication. Microsoft Graph exposes granular permissions that control the access that apps have to resources, like users, groups, and mail. When a user signs in to your app they, or, in some cases, an administrator, are given a chance to consent to these permissions. If the user consents, your app is given access to the resources and APIs that it has requested. For apps that don't take a signed-in user, permissions can be pre-consented to by an administrator when the app is installed.
Microsoft Graph has two types of permissions:
- Delegated permissions are used by apps that have a signed-in user present. For these apps, either the user or an administrator consents to the permissions that the app requests, and the app can act as the signed-in user when making calls to Microsoft Graph. Some delegated permissions can be consented by non-administrative users, but some higher-privileged permissions require administrator consent.
- Application permissions are used by apps that run without a signed-in user present; for example, apps that run as background services or daemons. Application permissions can only be consented by an administrator.
This source requires Application permissions. Follow these instructions for creating an app in the Azure portal. This process will produce the client_id
, client_secret
, and tenant_id
needed for the tap configuration file.
- Login to Azure Portal
- Click upper-left menu icon and select Azure Active Directory
- Select App Registrations
- Click New registration
- Register an application
- Name:
- Supported account types: Accounts in this organizational directory only
- Register (button)
- Record the client_id and tenant_id which will be used by the tap for authentication and API integration.
- Select Certificates & secrets
- Provide Description and Expires
- Description: tap-microsoft-onedrive client secret
- Expires: 1-year
- Add
- Copy the client secret value, this will be the client_secret
- Select API permissions
- Click Add a permission
- Select Microsoft Graph
- Select Application permissions
- Select the following permissions:
- Files
- Files.Read.All
- Files
- Click Add permissions
- Click Grant admin consent
Step 2: Set up the Microsoft OneDrive connector in Airbyte
- Navigate to the Airbyte Open Source dashboard.
- Click Sources and then click + New source.
- On the Set up the source page, select Microsoft OneDrive from the Source type dropdown.
- Enter the name for the Microsoft OneDrive connector.
- Enter Drive Name. To find your drive name go to settings and at the top of setting menu you can find the name of your drive.
- Enter Folder Path.
- Switch to Service Key Authentication
- For User Practical Name, enter the UPN for your user.
- Enter Tenant ID, Client ID and Client secret.
- For Start Date, enter the date in YYYY-MM-DD format. The data added on and after this date will be replicated.
- Add a stream:
- Write the File Type
- In the Format box, use the dropdown menu to select the format of the files you'd like to replicate. The supported formats are CSV, Parquet, Avro and JSONL. Toggling the Optional fields button within the Format box will allow you to enter additional configurations based on the selected format. For a detailed breakdown of these settings, refer to the File Format section below.
- Give a Name to the stream
- (Optional) - If you want to enforce a specific schema, you can enter a Input schema. By default, this value is set to
{}
and will automatically infer the schema from the file(s) you are replicating. For details on providing a custom schema, refer to the User Schema section. - Optionally, enter the Globs which dictates which files to be synced. This is a regular expression that allows Airbyte to pattern match the specific files to replicate. If you are replicating all the files within your bucket, use
**
as the pattern. For more precise pattern matching options, refer to the Path Patterns section below.
- Click Set up source
Sync overview
Data type mapping
Integration Type | Airbyte Type |
---|---|
string | string |
number | number |
array | array |
object | object |
Features
Feature | Supported?(Yes/No) |
---|---|
Full Refresh Sync | Yes |
Incremental Sync | Yes |
Performance considerations
The connector is restricted by normal Microsoft Graph requests limitation.
Reference
Config fields reference
Changelog
Version | Date | Pull Request | Subject |
---|---|---|---|
0.1.8 | 2024-03-06 | 35858 | Bump poetry.lock to upgrade transitive dependency |
0.1.7 | 2024-03-0q | 34936 | Enable in Cloud |
0.1.6 | 2024-02-06 | 34936 | Bump CDK version to avoid missing SyncMode errors |
0.1.5 | 2024-01-30 | 34681 | Unpin CDK version to make compatible with the Concurrent CDK |
0.1.4 | 2024-01-30 | 34661 | Pin CDK version until upgrade for compatibility with the Concurrent CDK |
0.1.3 | 2024-01-24 | 34478 | Fix OAuth |
0.1.2 | 2021-12-22 | 33745 | Add ql and sl to metadata |
0.1.1 | 2021-12-15 | 33758 | Fix for docs name |
0.1.0 | 2021-12-06 | 32655 | New source |