SharePoint Connector Documentation

If you have already set up a connector, skip to How to Use the SharePoint Connector.

Connect your SharePoint to Abacus.AI

To integrate SharePoint with Abacus.AI, you need to set up the connector and provide the necessary permissions.

Setting Up the SharePoint Connector

Flow 1: Without "Only Pull Folder" (Toggle No)

  1. Before setting up the SharePoint Connector, you need to provide admin consent or register the Abacus.AI application.

Go to the Admin Consent URL and grant consent or register the application.

  1. Access Connected Services Dashboard:

  2. Add New Connector:

    • Click on the "Add New Connector" option, select "SharePoint" from the list, enter your site URL, and click Save.
  3. Verify Connector Status:

    • Your connector should be set up and confirm that it has an "ACTIVE" status.
  4. Granting Permissions to the Client ID

    After setting up the connector, you will see the client ID. You need to provide permission for your site to this client ID:

    1. Go to https://subdomain.sharepoint.com/sites/name-of-your-site/_layouts/15/appinv.aspx.
    2. Paste the client ID in place of App Id then click on the lookup button to fetch the information for the client ID.
    3. In the App Domain field, type abacus.ai.
    4. In the Permission Request XML field, put the following XML code and click on create:

    xml <AppPermissionRequests AllowAppOnlyPolicy="true"> <AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="Read"/> </AppPermissionRequests>

  5. A new page will load, click Trust It to grant the permission.

NOTE: If you are not able to lookup the client id or you get the following error message when you try to verify your SharePoint connector,

Invalid Connector Configuration: Failed to verify SharePoint connector due to bad SharePoint connection. SharePoint response:{"error":"invalid_request","error_description":"Token type is not allowed."}

You need to ask your administrator to configure settings in your SharePoint by running the following commands in a Windows OS/VM:

```powershell
    Install-Module -Name Microsoft.Online.SharePoint.PowerShell
    Import-Module Microsoft.Online.SharePoint.PowerShell
    Connect-SPOService -Url https://<orgName>-admin.sharepoint.com
    Set-SPOTenant -DisableCustomAppAuthentication $false
    Set-SPOTenant -SiteOwnerManageLegacyServicePrincipalEnabled $true
```

Please replace <orgName> with your actual organization name in the SharePoint admin URL.

Flow 2: With "Only Pull Folder" (Toggle Yes)

  1. Before you begin, create a new SharePoint user and give it access only to the data that you want to pull from SharePoint.

This step ensures that the connector has the necessary permissions to access the specific folder you want to pull data from.

  1. Access Connected Services Dashboard:

  2. Add New Connector:

    • Click on the "Add New Connector" option, select "SharePoint" from the list, enter your site URL, and click Save.
  3. Toggle "Only Pull Folder" to "Yes". Provide the new user's Microsoft email and password, then click Save.

Sharepoint Pull Folder

  1. Verify Connector Status:

    • Your connector should be set up and confirm that it has an "ACTIVE" status.
  2. No Additional Permissions Required: With this flow, you do not need to grant additional permissions to the client ID.

How to Use the SharePoint Connector

Once the SharePoint connector is set up, you can fetch data to train models in Abacus.AI.

  1. Create a new project and select the use case, then go to the "Datasets" tab and click "Create Dataset".

Create Dataset

  1. Click on "Create New".

Create New Dataset

  1. Name the dataset, select the data type 'List of documents', and click "Continue".

Name Dataset

  1. Choose "Read from External Service" and select your SharePoint connector under "Connected Application Connectors".

  2. Enter the Site URL for the SharePoint site you want to use, and specify the folder path if you have set up the connector to pull from a specific folder.

  3. After the dataset is uploaded, configure the schema mapping and proceed to train models with the data.

Train Model with Data

Troubleshooting and FAQ for the SharePoint connector

Can I use multiple SharePoint connectors in Abacus.AI?

Yes, you can set up multiple SharePoint connectors in Abacus.AI, each with different configurations and permissions.

What's the right feature mapping schema that will allow documents to use the URLs of the original file location on the source page in the external chat portal?

To get the URLs to the original location of a file on the source page in the chatweb, you should set the URL as "Document source" instead of the file_path which is set as a document source by default.