Skip to content

Commit 9345c67

Browse files
authored
Platform: OneDrive source connector (#333)
1 parent e7d4df5 commit 9345c67

File tree

7 files changed

+42
-37
lines changed

7 files changed

+42
-37
lines changed

mint.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,7 @@
451451
"platform/sources/azure-blob-storage",
452452
"platform/sources/databricks-volumes",
453453
"platform/sources/google-cloud",
454+
"platform/sources/onedrive",
454455
"platform/sources/s3",
455456
"platform/sources/sharepoint"
456457
]

platform/connectors.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ The Unstructured Platform supports connecting to the following source and destin
1313

1414
- [Azure](/platform/sources/azure-blob-storage)
1515
- [Google Cloud Storage](/platform/sources/google-cloud)
16+
- [OneDrive](/platform/sources/onedrive)
1617
- [S3](/platform/sources/s3)
1718
- [SharePoint](/platform/sources/sharepoint)
1819

File renamed without changes.

platform/sources/overview.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ To create a source connector:
2020

2121
- [Azure](/platform/sources/azure-blob-storage)
2222
- [Google Cloud Storage](/platform/sources/google-cloud)
23+
- [OneDrive](/platform/sources/onedrive)
2324
- [S3](/platform/sources/s3)
2425
- [SharePoint](/platform/source/sharepoint)
2526

snippets/general-shared-text/onedrive-cli-api.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import AdditionalIngestDependencies from '/snippets/general-shared-text/ingest-d
1010

1111
The following environment variables:
1212

13-
- `ONEDRIVE_PATH` - The path to the target OneDrive folder, represented by `--path` (CLI) or `path` (Python).
14-
- `ONEDRIVE_CLIENT_ID` - The client ID for the Azure app that is registered with Microsoft Graph and assigned the correct OneDrive authentication scopes in Microsoft Entra ID (formerly Azure Active Directory (Azure AD)), represented by `--client-id` (CLI) or `client_id` (Python).
15-
- `ONEDRIVE_CLIENT_CRED` - The client secret for the Azure app, represented by `--client-cred` (CLI) or `client_cred` (Python).
16-
- `ONEDRIVE_TENANT` - The tenant for the Azure app, represented by `--tenant` (CLI) or `tenant` (Python).
17-
- `ONEDRIVE_USER_PNAME` - The Entra ID principal name (typically your Entra ID email), represented by `--user-pname` (CLI) or `user_pname` (Python).
18-
- `ONEDRIVE_AUTHORITY_URL` - The authentication token provider for Microsoft apps (typically `https://login.microsoftonline.com`, the default if not otherwise specified), represented by `--authority-url` (CLI) or `authority_url` (Python).
13+
- `ONEDRIVE_PATH` - The path to the target folder in the OneDrive account, starting with the account's root folder (for example `my-folder/my-subfolder`), represented by `--path` (CLI) or `path` (Python).
14+
- `ONEDRIVE_CLIENT_ID` - The application (client) ID of the Microsoft Entra ID app registration that has access to the OneDrive account, represented by `--client-id` (CLI) or `client_id` (Python).
15+
- `ONEDRIVE_CLIENT_CRED` - The client secret for the Entra ID app registration, represented by `--client-cred` (CLI) or `client_cred` (Python).
16+
- `ONEDRIVE_TENANT` - The directory (tenant) ID of the Entra ID app registration, represented by `--tenant` (CLI) or `tenant` (Python).
17+
- `ONEDRIVE_USER_PNAME` - The User Principal Name (UPN) for the OneDrive user account in Entra ID (typically the user's email address), represented by `--user-pname` (CLI) or `user_pname` (Python).
18+
- `ONEDRIVE_AUTHORITY_URL` - The authentication token provider URL for the Entra ID app registration (the default is `https://login.microsoftonline.com` if not otherwise specified), represented by `--authority-url` (CLI) or `authority_url` (Python).
1919

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
Fill in the following fields:
22

33
- **Name** (_required_): A unique name for this connector.
4-
- **Client ID** (_required_): The ID of the client for the associated Microsoft Entra ID app.
5-
- **Client Credential** (_required_): The credential for the associated Entra ID app.
6-
- **Tenant ID** (_required_): The ID of the tenant for the associated Entra ID app.
7-
- **Authority URL**: The URL for the authentication token provider for Entra ID app (typically **https://login.microsoftonline.com**).
8-
- **Principal Name** (_required_): The name of the Entra ID principal (typically your Entra ID email).
9-
- **Path**: Path to the target OneDrive folder.
10-
- **Recursive**: Check this box recursively access files from subfolders within the specified OneDrive path.
4+
- **Client ID** (_required_): The application (client) ID of the Microsoft Entra ID app registration that has access to the OneDrive account.
5+
- **Tenant ID** (_required_): The directory (tenant) ID of the Entra ID app registration.
6+
- **Authority URL** (_required_): The authentication token provider URL for the Entra ID app registration. The default is `https://login.microsoftonline.com`.
7+
- **Principal Name** (_required_): The User Principal Name (UPN) for the OneDrive user account in Entra ID. This is typically the user's email address.
8+
- **Path**: The path to the target folder in the OneDrive account, starting with the account's root folder, for example `my-folder/my-subfolder`.
9+
- **Recursive**: Check this box to recursively access files from subfolders within the specified OneDrive path.
10+
- **Client Credential** (_required_): The client secret for the Entra ID app registration.
11+
12+
13+
Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
11
The OneDrive prerequisites:
22

3-
- A OneDrive account.
4-
- Path to the target OneDrive folder.
5-
- The client ID, client secret, and tenant ID for the Azure app that is registered with Microsoft Graph and assigned the correct OneDrive authentication scopes in Microsoft Entra ID (formerly Azure Active Directory (Azure AD)). See [Registering your app for Microsoft Graph](https://learn.microsoft.com/onedrive/developer/rest-api/getting-started/app-registration) and [OneDrive authentication and sign-in](https://learn.microsoft.com/onedrive/developer/rest-api/getting-started/msa-oauth).
6-
7-
<iframe
8-
width="560"
9-
height="315"
10-
src="https://www.youtube.com/embed/uJsdMIpuuno?start=14&end=372"
11-
title="YouTube video player"
12-
frameborder="0"
13-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
14-
allowfullscreen
15-
></iframe>
3+
<iframe
4+
width="560"
5+
height="315"
6+
src="https://www.youtube.com/embed/7uSu0LsbcEQ"
7+
title="YouTube video player"
8+
frameborder="0"
9+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
10+
allowfullscreen
11+
></iframe>
1612

17-
<iframe
18-
width="560"
19-
height="315"
20-
src="https://www.youtube.com/embed/aKNmym2nYzY?start=43&end=241"
21-
title="YouTube video player"
22-
frameborder="0"
23-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
24-
allowfullscreen
25-
></iframe>
13+
- A OneDrive account.
14+
- The User Principal Name (UPN) for the OneDrive account. This is typically the OneDrive account user's email address.
15+
- The path to the target OneDrive folder, starting from the OneDrive account's root folder, for example `my-folder/my-subfolder`.
16+
- The client ID, tenant ID, and client secret for the Microsoft Entra ID app registration that has access to the target OneDrive account and
17+
also has the correct set of Microsoft Graph authentication scopes. These scopes include:
2618

27-
- The Entra ID principal name (typically your Entra ID email).
19+
- `Files.ReadWrite.All` (if both reading and writing are needed)
20+
- `Sites.ReadWrite.All` (if both reading and writing are needed)
21+
- `User.Read.All`
22+
- `Directory.Read.All`
23+
24+
See also:
2825

29-
See also the [OneDrive API documentation](https://docs.microsoft.com/onedrive/developer/rest-api/).
26+
- [Registering your app for Microsoft Graph](https://learn.microsoft.com/onedrive/developer/rest-api/getting-started/app-registration)
27+
- [OneDrive authentication and sign-in](https://learn.microsoft.com/onedrive/developer/rest-api/getting-started/msa-oauth)
28+
- [OneDrive API documentation](https://docs.microsoft.com/onedrive/developer/rest-api/)

0 commit comments

Comments
 (0)