If you have already set up a connector, skip to How to Use the SharePoint Connector.
To integrate SharePoint with Abacus.AI, you need to set up the connector and provide the necessary permissions.
Go to the Admin Consent URL and grant consent or register the application.
Access Connected Services Dashboard:
Add New Connector:
Enable Realtime Synced Datasets (Optional):
Yes
if you want to sync datasets in real time.Enable Multi-Site Selection (Optional):
Yes
.sharepoint.com
.+
button to add multiple site names or enter them as comma-separated values in the "Sites" field.Example:
- If your SharePoint domain is https://example.sharepoint.com
, and you want to pull data from two sites, enter:
site1, site2
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:
subdomain
.sharepoint.com/sites/name-of-your-site
/_layouts/15/appinv.aspx.abacus.ai
.xml
<AppPermissionRequests AllowAppOnlyPolicy="true">
<AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="Read"/>
</AppPermissionRequests>
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.
This step ensures that the connector has the necessary permissions to access the specific folder you want to pull data from.
Note: You will need to create a password for the SharePoint user and not use the temporary password provided for the service account upon initial creation.
Access Connected Services Dashboard:
Add New Connector:
Select "Username + Password" from the 'Authentication Type' dropdown. Provide the new user's Microsoft email and password, then click Create
.
Verify Connector Status:
No Additional Permissions Required: With this flow, you do not need to grant additional permissions to the client ID.
Before setting up the SharePoint Connector with OAuth, ensure that you have the necessary permissions to generate an OAuth token for accessing your SharePoint site.
Access Connected Services Dashboard:
Add New Connector:
Select "OAuth" from the 'Authentication Type' dropdown.
Click on Connect Sharepoint
button to create and save the connector.
Select Authentication Type:
- Go to the Abacus.AI Connected Services Dashboard. You can click your profile in the top right and then click "Manage Connectors".
- Click on the "Add New Connector" option, select "SharePoint" from the list, and choose "Personal Service Principal" as the authentication type.
Enter Client ID:
- Provide the Client ID for your Personal Service Principal.
Optional Configurations:
- If you want to pull data from multiple SharePoint sites, toggle the "Pull from Multiple Sites" option to Yes
.
- Note: The "Enable Realtime Synced Datasets" option is only available for the App Based flow and is not applicable here.
Save and Verify:
- Click "Save". A popup box will appear with a certificate. Download this certificate as it will be required for the next steps.
Grant Permissions in Microsoft:
- Grant the following four permissions in Microsoft for the Personal Service Principal:
Upload the Certificate:
- Follow the instructions provided in the popup box to upload the certificate and complete the verification process.
Verify Connector Status:
- Once the permissions are granted and the certificate is uploaded, the connector should be set up and display an "ACTIVE" status.
Once the SharePoint connector is set up, you can fetch data to train models in Abacus.AI.
Choose "Read from External Service" and select your SharePoint connector under "Connected Application Connectors".
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.
After the dataset is uploaded, configure the schema mapping and proceed to train models with the data.
By combining both feature group types, you can handle both unstructured and structured data effectively in a single project.
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.