> ## Documentation Index
> Fetch the complete documentation index at: https://docs.adriel.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to connect

> How to connect the File from OneDrive data source to Adriel: authorize a Microsoft account, select a drive and file, and sync a CSV on schedule.

File from OneDrive ingests CSV files from Microsoft 365 accounts through the Microsoft Graph API. Because Graph exposes personal OneDrive, OneDrive for Business, and SharePoint document libraries as drives behind a single API, the same connector reaches all three — watching a selected file and refreshing its contents on schedule.

## Before you connect

The following are required:

* A Microsoft account (personal or work/school) with access to the target drive.
* A CSV file located in OneDrive, OneDrive for Business, or a SharePoint document library.
* Authority to grant read access to files and sites during the OAuth flow.

## Connect File from OneDrive

<Steps>
  <Step title="Authorize a Microsoft account">
    On the **Data Sources** page, search for **File from OneDrive** and select it. Sign in to the Microsoft account in the pop-up window and approve the requested read scopes for files and sites.
  </Step>

  <Step title="Configure the required fields">
    On the data source settings, fill in the required fields:

    * **Name** — an identifiable name for the data source.
    * **Drive** — choose the target drive from the dropdown list.
    * **File Type** — choose from the dropdown list. Only CSV is currently supported.
  </Step>

  <Step title="Configure the optional fields">
    Set any of the following optional fields to narrow down the file(s) to process:

    * **First Depth Folder Name** — the name of a folder located directly under the selected directory that contains the file(s) to be processed.
    * **File Name to Filter** — a word found within the file name(s), used for filtering. Ensure accurate capitalization for best results.
    * **Alternative Channel Name** — an alternative display name for the data source. No icon is provided by default, but some channels can display an internally saved icon next to the name entered. See the [Alternative Channel Name guide](https://academy.adriel.com/en/how-to-set-alternative-channel-name-for-file-db-data-source) for the correct value to display the icon.
  </Step>

  <Step title="Submit">
    Click **Submit** to complete the connection. Initial data availability can take up to one business day.
  </Step>
</Steps>

## What gets imported

The first row of the file is treated as the header. Numeric columns become metrics and text columns become breakdowns. Only the configured file is ingested; importing multiple files requires creating multiple data sources.

For the complete field list, see the [File from OneDrive data reference](/data-sources/a-f/file-from-onedrive/data-reference).

## Troubleshooting

<AccordionGroup>
  <Accordion title="Authorization fails or scopes are missing">
    The Microsoft account either lacks access to the target drive or did not approve all requested scopes. Reconnect using an account with the necessary access and grant consent for files and sites.
  </Accordion>

  <Accordion title="Sync stops working after a long pause">
    The OAuth grant was revoked in the Microsoft account portal. Only the refresh token is persisted, so revocation breaks all subsequent syncs. Reconnect the data source to issue new tokens.
  </Accordion>

  <Accordion title="Download timeouts on large files">
    File downloads time out after ten seconds. Split large CSVs into smaller files or host them on a faster drive.
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="File from OneDrive data reference" href="/data-sources/a-f/file-from-onedrive/data-reference">
    Fields, metrics, breakdowns, and limits for File from OneDrive.
  </Card>

  <Card title="File from OneDrive FAQs" href="/data-sources/a-f/file-from-onedrive/faqs">
    Common questions and expected behaviors for the File from OneDrive data source.
  </Card>

  <Card title="How to connect File from Email" href="/data-sources/a-f/file-from-email/how-to-connect">
    Ingest CSV attachments delivered by email.
  </Card>

  <Card title="How to connect File from SFTP" href="/data-sources/a-f/file-from-sftp/how-to-connect">
    Ingest CSV files from an SFTP server.
  </Card>
</CardGroup>
