Skip to main content

Connect to SharePoint

A step-by-step walkthrough for connecting SharePoint data to Workleap AI

Updated over 2 weeks ago

The SharePoint connector enables Workleap AI to retrieve and index content from SharePoint sites, allowing users to search for and access documents based on their authorized permissions.

To authenticate a SharePoint connection via OAuth, a Tenant ID, Application ID, and Client Secret are required. This guide will walk through the process of how to configure Azure and obtain both.

Note: This guide requires admin access to Microsoft Azure to complete.

1. Find your Tenant ID

  1. Sign into Azure.

  2. Switch to the tenant you'd like to connect with Workleap AI.

  3. Find Microsoft Entra ID.

  4. In the left menu, expand Manage, and click on Properties.

  5. Copy the Tenant ID field.

2. Create your Application ID

  1. In the left menu, expand Manage, and click on App registrations.

  2. Click New registration.

  3. Enter registration details:

    • In the top field, enter an app name. This can be anything, but we recommend using "Workleap AI" here.

    • Select an appropriate account type in Supported account types. We recommend the default option of "Accounts in any organizational directory (Any Azure AD directory - Multitenant)" here.

    • Leave the Redirect URI field empty.

  4. Click Register. You will be taken to the application page. This page will show you the Client ID. Copy this down.

3. Create a Secret ID

  1. On the application page, click Certificates & secrets.

  2. Click New client secret.

  3. Enter a Description (we recommend using "Workleap AI" here) and set Expires to "24 months (730 days)". Then, click Add.

  4. Copy the Secret ID.
    IMPORTANT: This is the only time the secret ID will be visible in the app. Be sure to copy and store it securely for future use.

4. Assign API Permissions

  1. Go to Manage > API permissions.

  2. Click Add a permission.

  3. Scroll down to find SharePoint. Open it.

  4. Select Applications Permissions.

  5. Check the following items, then Add Permissions:

    1. User.Read.All (this will be enabled by default)

    2. Files.Read.All

    3. Group.Read.All

    4. Sites.FullControl.All

    5. Sites.Read.All

  6. Click Grant admin consent to assign your API Permissions.

5. Set up SharePoint REST API

Because the Graph API does not support several of our SharePoint use cases (such as site page permissions), we need to rely on the SharePoint REST API.

  1. Go to [sharepoint-domain]-admin.sharepoint.com/_layouts/15/appinv.aspx. For example, if your SharePoint URL is acme.sharepoint.com, then replace [sharepoint-domain] with acme.

  2. Use the Client ID from the previous step to locate the app.

  3. In the Permission Request XML field, paste the following:

<AppPermissionRequests AllowAppOnlyPolicy="true"> <AppPermissionRequest Scope="http://sharepoint/content/tenant" Right="FullControl" /> <AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="FullControl" /> <AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="FullControl" /></AppPermissionRequests>

4. Click Create.

5. When prompted whether you trust this application, click Trust It.

6. Connect to SharePoint in Workleap AI

  1. Click the Connect to app button and select SharePoint.

  2. Fill in the SharePoint connection details using the Tenant ID, Application ID, and Secret ID from earlier, and click Connect to SharePoint.

  3. Select which SharePoint sites that Workleap AI will have access to and click Begin initial sync.

  4. You're done! Workleap AI will process data from your selected SharePoint sites, and use the knowledge within them to craft more meaningful responses to prompts. It may take several minutes to hours for SharePoint data to fully process, depending on the amount of content selected.

Did this answer your question?