SharePoint
SharePoint Data Connector Documentation
The SharePoint Data Connector enables federated SQL queries on documents stored in SharePoint.
Example
Returns
Limitations The sharepoint connector does not yet support creating a dataset from a single file (e.g. an Excel spreadsheet). Datasets must be created from a folder of documents (see Document Support).
Configuration
Parameters
sharepoint_client_id
Yes
The client ID of the Azure AD (Entra) application
sharepoint_tenant_id
Yes
The tenant ID of the Azure AD (Entra) application.
sharepoint_client_secret
Optional
For service principal authentication. The client secret of the Azure AD (Entra) application.
Only one of sharepoint_client_secret
or sharepoint_bearer_token
is allowed.
from
formats
from
formatsThe from
field in a SharePoint dataset takes the following format:
Drives
drive_type
in a SharePoint Connector from
field supports the following types:
drive
The SharePoint drive's name
from: sharepoint:drive:Documents/...
driveId
The SharePoint drive's ID
from: sharepoint:driveId:b!Mh8opUGD80ec7zGXgX9r/...
site
A SharePoint site's name
from: sharepoint:site:MySite/...
siteId
A SharePoint site's ID
from: sharepoint:siteId:b!Mh8opUGD80ec7zGXgX9r/...
group
A SharePoint group's name
from: sharepoint:group:MyGroup/...
groupId
A SharePoint group's ID
from: sharepoint:groupId:b!Mh8opUGD80ec7zGXgX9r/...
me
A user's OneDrive
from: sharepoint:me/...
For the me
drive type the user is identified based on sharepoint_client_code
and cannot be used with sharepoint_client_secret
For a name-based drive_id
, the connector will attempt to resolve the name to an ID at startup.
Subpaths
Within a drive, the SharePoint connector can load documents from:
The root of the drive
from: sharepoint:me/root
A specific path within the drive
from: sharepoint:drive:Documents/path:/top_secrets
A specific folder ID
from: sharepoint:group:MyGroup/id:01QM2NJSNHBISUGQ52P5AJQ3CBNOXDMVNT
Authentication
Creating an Enterprise Application
To use the SharePoint connector with service principal authentication, you will need to create an Azure AD application and grant it the necessary permissions. This will also support OAuth2 authentication for users within the tenant (i.e. sharepoint_bearer_token
).
Create a new Azure AD application in the Azure portal.
Under the application's
API permissions
, add the following permissions:Sites.Read.All
,Files.Read.All
,User.Read
,GroupMember.Read.All
For service principal authentication, Application permissions are required.
For user authentication, only delegated permissions are required.
Add
sharepoint_client_id
(from theApplication (Client) ID
field) andsharepoint_tenant_id
to the connector configuration.Under the application's
Certificates & secrets
, create a new client secret. Use this for thesharepoint_client_secret
parameter.
Last updated
Was this helpful?