## Connect to SharePoint On-Premises

Integrate your self-hosted SharePoint sites with the AIRIA DataStore using the SharePoint On-Premises connector.

### Authentication Methods

The SharePoint On-Premises connector supports Basic authentication method using a username and password. 

---

## Configure Basic Authentication

Basic Authentication is the recommended method for connecting to SharePoint On-Premises.

### 1. SharePoint Server Configuration

To use Basic Authentication, ensure your SharePoint environment is properly configured.

#### IIS Configuration

1.  Open **IIS Manager**.
2.  Navigate to your SharePoint web application.
3.  In the **Authentication** settings, enable **Basic Authentication**.
4.  If not required, disable **Anonymous Authentication**.

#### SharePoint Central Administration

1.  Navigate to **Application Management** > **Manage Web Applications**.
2.  Select your relevant web application.
3.  Click **Authentication Providers**.
4.  Ensure **Basic Authentication** is enabled for the appropriate zone.

#### HTTPS Requirements

> ⚠️ Warning: Basic Authentication sends credentials in Base64 encoding, which is not encryption. Always use HTTPS in production environments to protect credentials during transmission.

*   Ensure HTTPS is properly configured on your SharePoint server.
*   An SSL certificate must be correctly installed and configured.

#### Alternate Access Mappings (AAM)

Confirm that the HTTPS URL is correctly added to your SharePoint Alternate Access Mappings (AAM).

1.  In **Central Administration**, navigate to **Alternate Access Mappings**.
2.  Edit the **Public URLs**.
3.  Select the **Internet** zone for your web application.
4.  Add the following:
    *   An internal URL using HTTP.
    *   A public URL using HTTPS.
    *   Both should be mapped to the **Internet** zone.

### 2. Set Up the AIRIA SharePoint On-Premises Connector

Once SharePoint is configured, create and set up your data source in AIRIA.

#### 1. Add a New SharePoint Data Source

1.  In the AIRIA platform, navigate to **Available data sources**.
2.  Select the **SharePoint** card.

#### 2. Configure Data Source Details

Provide the necessary information for your data source:

*   **Name**: A mandatory, descriptive name for your data source (e.g., `SharePoint On-Prem HR Docs`).
*   **Description**: (Optional) A brief description.
*   **Scope**: Select the AIRIA project for this data source.
*   **Site URL**: Enter the full URL of your specific SharePoint site (e.g., 'https://sharepoint1.airia51.com/sites/connectortest').
*   **Username**: Enter the username for Basic Authentication.
*   **Password**: Enter the password for Basic Authentication.
*   **Domain**: Leave this field blank unless it is specifically required by your SharePoint Basic Authentication configuration.

#### 3. Select Content and Start Ingestion

1.  Click **Next**. The system will retrieve the root site name.
2.  Browse and select the specific document libraries, folders, or files you want to sync from the specific site. You can select and deselect individual items.

**Supported content types for ingestion include:**

*   SharePoint sites
*   SharePoint subsites
*   SharePoint document libraries
*   Folders
*   Files
*   Shared content

> 💡 Tip: Selecting a SharePoint site, library, or folder will sync all supported content within it, including files, subfolders, and their content. Reprocessing the data source will automatically sync newly added content, update modified content, and delete removed items within the selected content.

> 💡 Note: To edit your content selection, navigate to the data source and click **Edit**. You may need to reauthenticate. Then click **Next** to make your new selections. If you reauthenticate with new user credentials, the content selector will not show previous selections, and you will need to reselect all desired items.
