---
title: Ingest data from SharePoint
description: Create a managed Microsoft SharePoint ingestion pipeline in Lakeflow Connect using the UI, Declarative Automation Bundles, or a notebook, and ingest files or SharePoint lists.
canonical_url: https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/sharepoint-pipeline
---

# Ingest data from SharePoint

> [!NOTE]
>
> The managed SharePoint connector supports use in workspaces with the [Configure enhanced security and compliance settings](https://docs.databricks.com/aws/en/security/privacy/enhanced-security-compliance.md) enabled.

Create a managed Microsoft SharePoint ingestion pipeline in Lakeflow Connect to ingest files and lists from SharePoint sites. You can create the pipeline using the Databricks UI, Declarative Automation Bundles, or a notebook.

## Requirements

* To create the ingestion pipeline, you must first meet the following requirements:

  * Your workspace must be enabled for Unity Catalog.

  * Serverless compute must be enabled for your workspace. See [Serverless compute requirements](https://docs.databricks.com/aws/en/compute/serverless/index.md#requirements).

  * To create a new connection, you must have `CREATE CONNECTION` privileges on the metastore. See [Manage privileges in Unity Catalog](https://docs.databricks.com/aws/en/data-governance/unity-catalog/manage-privileges/index.md).

    If the connector supports UI-based pipeline authoring, an admin can create the connection and the pipeline at the same time by completing the steps on this page. However, if the users who create pipelines use API-based pipeline authoring or are non-admin users, an admin must first create the connection in Catalog Explorer. See [Connect to managed ingestion sources](https://docs.databricks.com/aws/en/connect/managed-ingestion.md).

  * To use an existing connection, you must have `USE CONNECTION` privileges or `ALL PRIVILEGES` on the connection object.

  * You must have `USE CATALOG` privileges on the target catalog.

  * You must have `USE SCHEMA` and `CREATE TABLE` privileges on an existing schema or `CREATE SCHEMA` privileges on the target catalog.

* To ingest from SharePoint, you must first configure a supported authentication method. See [Set up OAuth U2M: Databricks-managed (Recommended)](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/sharepoint-source-setup-overview.md#u2m-databricks-managed).

## Create an ingestion pipeline

For a list of supported file formats and connector-specific limitations, see [Microsoft SharePoint connector limitations](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/sharepoint-limits.md).

### Databricks UI

1. In the sidebar of the Databricks workspace, click **Data Ingestion**.
2. On the **Add data** page, in the **Databricks connectors** section, click **Microsoft SharePoint**.
3. In the **Connection** step of the ingestion wizard, select the connection that stores your SharePoint access credentials. If you have the `CREATE CONNECTION` privilege on the metastore, you can click **![Plus icon.](https://docs.databricks.com/aws/en/images/product-icons/PlusIcon.svg) Create connection** to create a new connection with the authentication details in [Overview of SharePoint ingestion setup](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/sharepoint-source-setup-overview.md).
4. Click **Next**.
5. In the **Ingestion setup** step, enter a name for the pipeline.
6. Select a catalog and a schema for the pipeline. If you have `USE CATALOG` and `CREATE SCHEMA` privileges on the catalog, you can click **![Plus icon.](https://docs.databricks.com/aws/en/images/product-icons/PlusIcon.svg) Create schema** in the drop-down menu to create a new schema.
7. Click **Create ingestion pipeline and start compute**.
8. In the **Source** step, configure the SharePoint URL and file ingestion options.
9. Click **Save and continue**.
10. In the **Destination** step, select a catalog and a schema to load data into. If you have `USE CATALOG` and `CREATE SCHEMA` privileges on the catalog, you can click **![Plus icon.](https://docs.databricks.com/aws/en/images/product-icons/PlusIcon.svg) Create schema** in the drop-down menu to create a new schema.
11. Click **Save and continue**.
12. (Optional) In the **Schedules and notifications** step, click **![Plus icon.](https://docs.databricks.com/aws/en/images/product-icons/PlusIcon.svg) Create schedule**. Set the frequency to refresh the destination tables.
13. (Optional) Click **![Plus icon.](https://docs.databricks.com/aws/en/images/product-icons/PlusIcon.svg) Add notification** to set email notifications for pipeline operation success or failure, then click **Save and run pipeline**.

### Databricks notebook

1. Import the following notebook into your Databricks workspace:

   [Get notebook](https://docs.databricks.com/notebooks/source/saas-cdc/sharepoint-pipeline.html)

2. Do not modify cell one.

3. Modify cell three with your pipeline configuration details. See [pipeline.ingestion\_definition](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipeline-ingestion_definition) and [Examples](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/sharepoint-pipeline.md#examples).

4. Click **Run all**.

### Declarative Automation Bundles

Use Declarative Automation Bundles to manage SharePoint pipelines as code. Bundles can contain YAML definitions of jobs and tasks, are managed using the Databricks CLI, and can be shared and run in different target workspaces (such as development, staging, and production). For more information, see [What are Declarative Automation Bundles?](https://docs.databricks.com/aws/en/dev-tools/bundles/index.md).

1. Create a bundle using the Databricks CLI:

   ```bash
   databricks bundle init
   ```

2. Add two new resource files to the bundle:
   * A pipeline definition file (for example, `resources/sharepoint_pipeline.yml`). See [pipeline.ingestion\_definition](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipeline-ingestion_definition) and [Examples](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/sharepoint-pipeline.md#examples).
   * A job definition file that controls the frequency of data ingestion (for example, `resources/sharepoint_job.yml`).

3. Deploy the pipeline using the Databricks CLI:

   ```bash
   databricks bundle deploy
   ```

## <a id="examples" />Examples

Use these examples to configure your pipeline.

### <a id="binaryfile-ingestion" />Ingest files as unstructured data

Ingest all files in a SharePoint site as binary content. Use this approach for PDFs, Office documents, and other files you intend to process downstream, for example for RAG applications.

> [!NOTE]
>
> Available in Beta, the [`FILE`](https://docs.databricks.com/aws/en/sql/language-manual/data-types/file-type.md) type stores a governed reference to each file and its metadata instead of the file's bytes, which improves read performance. To ingest files as the `FILE` type instead of `BINARYFILE`, see [Ingest files as the FILE type (Beta)](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/sharepoint-pipeline.md#file-type-ingestion).

#### Declarative Automation Bundles

```yaml
resources:
  pipelines:
    sharepoint_binary_pipeline:
      name: sharepoint_binary_pipeline
      catalog: main
      schema: ingest_destination_schema
      channel: PREVIEW
      ingestion_definition:
        connection_name: <sharepoint-connection>
        objects:
          - table:
              destination_catalog: main
              destination_schema: ingest_destination_schema
              destination_table: site_files
              connector_options:
                sharepoint_options:
                  entity_type: FILE
                  url: https://<tenant>.sharepoint.com/sites/<site>
                  file_ingestion_options:
                    format: BINARYFILE
                    schema_evolution_mode: NONE
```

#### Databricks notebook

```python
pipeline_spec = """
{
  "name": "<pipeline-name>",
  "catalog": "main",
  "schema": "ingest_destination_schema",
  "ingestion_definition": {
    "connection_name": "<sharepoint-connection>",
    "objects": [
      {
        "table": {
          "destination_catalog": "main",
          "destination_schema": "ingest_destination_schema",
          "destination_table": "site_files",
          "connector_options": {
            "sharepoint_options": {
              "entity_type": "FILE",
              "url": "https://<tenant>.sharepoint.com/sites/<site>",
              "file_ingestion_options": {
                "format": "BINARYFILE",
                "schema_evolution_mode": "NONE"
              }
            }
          }
        }
      }
    ]
  },
  "channel": "PREVIEW"
}
"""
create_pipeline(pipeline_spec)
```

### <a id="file-type-ingestion" />Ingest files as the FILE type (Beta)

> [!NOTE]
> **Beta**
>
> This feature is in [Beta](https://docs.databricks.com/aws/en/release-notes/release-types.md).

Ingest files as the [`FILE`](https://docs.databricks.com/aws/en/sql/language-manual/data-types/file-type.md) type to store a governed reference to each file and its metadata instead of the file's bytes. The destination table exposes a `file` column that you can pass to functions such as [`ai_parse_document` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/ai_parse_document.md) and to [user-defined functions (UDFs)](https://docs.databricks.com/aws/en/udf/index.md).

To use the `FILE` type, configure the following in your pipeline:

* Set the pipeline `channel` to `PREVIEW`.
* Set `file_ingestion_options.format` to `FILE`.
* Set the `databricks.filespace-preview` table property to declare the volume Unity Catalog uses as managed storage.

#### Declarative Automation Bundles

```yaml
resources:
  pipelines:
    sharepoint_file_pipeline:
      name: sharepoint_file_pipeline
      channel: PREVIEW
      catalog: <catalog>
      schema: <schema>
      ingestion_definition:
        connection_name: <sharepoint-connection>
        objects:
          - table:
              destination_catalog: <catalog>
              destination_schema: <schema>
              destination_table: <destination-table>
              table_configuration:
                table_properties:
                  databricks.filespace-preview: /Volumes/<catalog>/<schema>/<volume>/
              connector_options:
                sharepoint_options:
                  entity_type: FILE
                  url: https://<tenant>.sharepoint.com/sites/<site>
                  file_ingestion_options:
                    format: FILE
                    schema_evolution_mode: NONE
```

#### Databricks notebook

```python
pipeline_spec = """
{
  "name": "<pipeline-name>",
  "channel": "PREVIEW",
  "catalog": "<catalog>",
  "schema": "<schema>",
  "ingestion_definition": {
    "connection_name": "<sharepoint-connection>",
    "objects": [
      {
        "table": {
          "destination_catalog": "<catalog>",
          "destination_schema": "<schema>",
          "destination_table": "<destination-table>",
          "table_configuration": {
            "table_properties": {
              "databricks.filespace-preview": "/Volumes/<catalog>/<schema>/<volume>/"
            }
          },
          "connector_options": {
            "sharepoint_options": {
              "entity_type": "FILE",
              "url": "https://<tenant>.sharepoint.com/sites/<site>",
              "file_ingestion_options": {
                "format": "FILE",
                "schema_evolution_mode": "NONE"
              }
            }
          }
        }
      }
    ]
  }
}
"""
create_pipeline(pipeline_spec)
```

### <a id="structured-ingestion" />Ingest structured files

Ingest structured files (for example, JSON files) from a SharePoint folder. Each row in the source files becomes a row in the destination table.

#### Declarative Automation Bundles

```yaml
resources:
  pipelines:
    sharepoint_json_pipeline:
      name: sharepoint_json_pipeline
      catalog: main
      schema: ingest_destination_schema
      channel: PREVIEW
      ingestion_definition:
        connection_name: <sharepoint-connection>
        objects:
          - table:
              destination_catalog: main
              destination_schema: ingest_destination_schema
              destination_table: json_files
              connector_options:
                sharepoint_options:
                  entity_type: FILE
                  url: https://<tenant>.sharepoint.com/sites/<site>/<json_folder>
                  file_ingestion_options:
                    format: JSON
                    schema_evolution_mode: NONE
```

#### Databricks notebook

```python
pipeline_spec = """
{
  "name": "<pipeline-name>",
  "catalog": "main",
  "schema": "ingest_destination_schema",
  "ingestion_definition": {
    "connection_name": "<sharepoint-connection>",
    "objects": [
      {
        "table": {
          "destination_catalog": "main",
          "destination_schema": "ingest_destination_schema",
          "destination_table": "json_files",
          "connector_options": {
            "sharepoint_options": {
              "entity_type": "FILE",
              "url": "https://<tenant>.sharepoint.com/sites/<site>/<json_folder>",
              "file_ingestion_options": {
                "format": "JSON",
                "schema_evolution_mode": "NONE"
              }
            }
          }
        }
      }
    ]
  },
  "channel": "PREVIEW"
}
"""
create_pipeline(pipeline_spec)
```

### <a id="file-metadata-ingestion" />Ingest file metadata only

Ingest file metadata (name, size, timestamps, path) without downloading file contents. Use this approach when you need an inventory of files without the overhead of ingesting their content.

#### Declarative Automation Bundles

```yaml
resources:
  pipelines:
    sharepoint_metadata_pipeline:
      name: sharepoint_metadata_pipeline
      catalog: main
      schema: ingest_destination_schema
      channel: PREVIEW
      ingestion_definition:
        connection_name: <sharepoint-connection>
        objects:
          - table:
              destination_catalog: main
              destination_schema: ingest_destination_schema
              destination_table: file_metadata
              connector_options:
                sharepoint_options:
                  entity_type: FILE_METADATA
                  url: https://<tenant>.sharepoint.com/sites/<site>/<library>
                  file_ingestion_options:
                    format: BINARYFILE
                    schema_evolution_mode: NONE
```

#### Databricks notebook

```python
pipeline_spec = """
{
  "name": "<pipeline-name>",
  "catalog": "main",
  "schema": "ingest_destination_schema",
  "ingestion_definition": {
    "connection_name": "<sharepoint-connection>",
    "objects": [
      {
        "table": {
          "destination_catalog": "main",
          "destination_schema": "ingest_destination_schema",
          "destination_table": "file_metadata",
          "connector_options": {
            "sharepoint_options": {
              "entity_type": "FILE_METADATA",
              "url": "https://<tenant>.sharepoint.com/sites/<site>/<library>",
              "file_ingestion_options": {
                "format": "BINARYFILE",
                "schema_evolution_mode": "NONE"
              }
            }
          }
        }
      }
    ]
  },
  "channel": "PREVIEW"
}
"""
create_pipeline(pipeline_spec)
```

### <a id="bundle-job-definition-file" />Declarative Automation Bundles job definition file

The following is an example job definition file for use with Declarative Automation Bundles. The job runs every day, exactly one day from the last run.

#### Declarative Automation Bundles

```yaml
resources:
  jobs:
    sharepoint_job:
      name: sharepoint_job

      trigger:
        periodic:
          interval: 1
          unit: DAYS

      email_notifications:
        on_failure:
          - <email-address>

      tasks:
        - task_key: refresh_pipeline
          pipeline_task:
            pipeline_id: ${resources.pipelines.sharepoint_binary_pipeline.id}
```

## Configure file ingestion options

The `file_ingestion_options` block controls how files are processed. All options are set inside the `sharepoint_options.file_ingestion_options` block in the pipeline definition.

### File filters

Use `file_filters` to restrict which files are ingested from the source URL:

```json
"file_ingestion_options": {
  "format": "CSV",
  "file_filters": [
    { "path_filter": "invoices/*.csv" },
    { "modified_after": "2026-01-01T00:00:00" }
  ]
}
```

For full `file_ingestion_options` parameter reference, see [Microsoft SharePoint connector reference](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/sharepoint-reference.md).

### Schema evolution

Set `schema_evolution_mode` to control how new columns in incoming files are handled. Modes match Auto Loader schema evolution modes. For details, see [Microsoft SharePoint connector reference](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/sharepoint-reference.md).

### Schema hints

Override inferred column types using `schema_hints`:

```json
"file_ingestion_options": {
  "format": "CSV",
  "schema_hints": "order_id INT, amount DOUBLE, ts TIMESTAMP"
}
```

See [Override schema inference with schema hints](https://docs.databricks.com/aws/en/ingestion/cloud-object-storage/auto-loader/schema.md#override-schema-inference-with-schema-hints) for usage details.

### Format-specific options

Pass format-specific options using `format_options`:

```json
"file_ingestion_options": {
  "format": "CSV",
  "format_options": {
    "header": "true",
    "sep": ","
  }
}
```

Supported keys are the standard Auto Loader format options. See [Format options](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/sharepoint-reference.md#format-options).

### Column names with special characters

If the column names in your files contain characters such as spaces, commas, or parentheses, the pipeline can fail with the `DELTA_INVALID_CHARACTERS_IN_COLUMN_NAMES` error. To resolve the error, set `delta.columnMapping.mode` to `name` in the `table_properties` of the destination table. For the steps and an example, see [Support special characters in column names](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/table-properties.md#special-characters).

## <a id="ingest-sharepoint-lists" />Ingest SharePoint lists

> [!NOTE]
> **Beta**
>
> This feature is in [Beta](https://docs.databricks.com/aws/en/release-notes/release-types.md).

You can ingest a single SharePoint list or all lists in a site. List ingestion uses `entity_type: LIST` and does not use the `file_ingestion_options` block. For the column type mappings, see [Microsoft SharePoint connector reference](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/sharepoint-reference.md).

### <a id="single-list-ingestion" />Ingest a single SharePoint list

Ingest a single SharePoint list as one Delta table. A SharePoint list is structured data with customizable columns, similar to a spreadsheet or a small database. Set `entity_type` to `LIST` and point `url` at the list.

#### Declarative Automation Bundles

```yaml
resources:
  pipelines:
    sharepoint_list_pipeline:
      name: sharepoint_list_pipeline
      catalog: main
      schema: ingest_destination_schema
      channel: PREVIEW
      ingestion_definition:
        connection_name: <sharepoint-connection>
        objects:
          - table:
              destination_catalog: main
              destination_schema: ingest_destination_schema
              destination_table: sharepoint_list
              connector_options:
                sharepoint_options:
                  entity_type: LIST
                  url: https://<tenant>.sharepoint.com/sites/<site>/Lists/<list>
```

#### Databricks notebook

```python
pipeline_spec = """
{
  "name": "<pipeline-name>",
  "catalog": "main",
  "schema": "ingest_destination_schema",
  "ingestion_definition": {
    "connection_name": "<sharepoint-connection>",
    "objects": [
      {
        "table": {
          "destination_catalog": "main",
          "destination_schema": "ingest_destination_schema",
          "destination_table": "sharepoint_list",
          "connector_options": {
            "sharepoint_options": {
              "entity_type": "LIST",
              "url": "https://<tenant>.sharepoint.com/sites/<site>/Lists/<list>"
            }
          }
        }
      }
    ]
  },
  "channel": "PREVIEW"
}
"""
create_pipeline(pipeline_spec)
```

### <a id="site-wide-list-ingestion" />Ingest all lists in a site

Ingest all lists in a SharePoint site under a single destination schema. Each list maps to one destination table named `<listId>_<listName>`, where `listId` is the tenant-unique ID of the list. Use a `schema` object instead of a `table` object and point `url` at the site.

To ingest all lists from a specific subsite, point `url` at the subsite (`https://<tenant>.sharepoint.com/sites/<site>/<subsite>`).

#### Declarative Automation Bundles

```yaml
resources:
  pipelines:
    sharepoint_lists_pipeline:
      name: sharepoint_lists_pipeline
      catalog: main
      schema: ingest_destination_schema
      channel: PREVIEW
      ingestion_definition:
        connection_name: <sharepoint-connection>
        objects:
          - schema:
              destination_catalog: main
              destination_schema: ingest_destination_schema
              connector_options:
                sharepoint_options:
                  entity_type: LIST
                  url: https://<tenant>.sharepoint.com/sites/<site>
```

#### Databricks notebook

```python
pipeline_spec = """
{
  "name": "<pipeline-name>",
  "catalog": "main",
  "schema": "ingest_destination_schema",
  "ingestion_definition": {
    "connection_name": "<sharepoint-connection>",
    "objects": [
      {
        "schema": {
          "destination_catalog": "main",
          "destination_schema": "ingest_destination_schema",
          "connector_options": {
            "sharepoint_options": {
              "entity_type": "LIST",
              "url": "https://<tenant>.sharepoint.com/sites/<site>"
            }
          }
        }
      }
    ]
  },
  "channel": "PREVIEW"
}
"""
create_pipeline(pipeline_spec)
```

## <a id="common-patterns" />Common patterns

For advanced pipeline configurations, see [Common patterns for managed ingestion pipelines](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/common-patterns.md).

## <a id="next-steps" />Next steps

* Start, schedule, and set alerts on your pipeline. See [Common pipeline maintenance tasks](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/pipeline-maintenance.md).
* You can parse the raw documents to text, chunk the parsed data, create embeddings from the chunks, and more. You can then use `readStream` on the output table directly in your downstream pipeline. See [Downstream RAG use case](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/sharepoint-rag.md).

## <a id="additional-resources" />Additional resources

* [Microsoft SharePoint connector FAQs](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/sharepoint-faq.md)
* [Microsoft SharePoint connector limitations](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/sharepoint-limits.md)
* [Microsoft SharePoint connector reference](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/sharepoint-reference.md)
* [Troubleshoot Microsoft SharePoint ingestion](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/sharepoint-troubleshoot.md)
