Authorization Type

Carbon uses OAuth 2.0 to connect to SharePoint.

Functionality

Microsoft Office files are supported with our SharePoint integration, along with other text, audio, video, and image file formats.

Authorization Flow

Enter your Sharepoint tenant and site name. For example, if the SharePoint site URL is https://jasoncarbon.sharepoint.com/sites/carbon-dev, jasoncarbon is the tenant and carbon-dev is the site name.

If the SharePoint site lacks a site name, you can leave the site name blank below.

Log into your Microsoft SharePoint account.

Click the “Confirm” button to grant us permission to access SharePoint.

Once clicking “Confirm”, you will be taken through a flow to grant permissions.

Click the “Select Files from SharePoint” button to open up the SharePoint file selector.

Click “Select” after selecting files to grant Carbon access to files.

You’ll see a screen confirming that your files have been added.

Configuration

Custom OAuth Credentials

Custom OAuth credentials is only required for customers who enable white labeling.

Setting up the OAuth App

  1. Create or log into your Microsoft Azure Account.

  2. Under Azure Services, select App Registration -> New registration.

  1. Select Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox) as the Supported account types.

  1. Add https://api.carbon.ai/integrations/onedrive and https://api.carbon.ai/integrations/sharepoint to Redirect URI and select Web under the Select a platform dropdown. You can also opt to use a custom CNAME record pointing to https://api.carbon.ai. The domain paths must still be /integrations/onedrive and /integrations/sharepoint.

  1. Under Manage -> API permissions add the permissions Files.Read.All, offline_access, openid, and User.Read.

  1. Under Client credentials, click Add a certificate or secret -> New Client Secret. Then copy the client secret’s Value and share it with us via Slack.

  1. Navigate to the Overview tab then copy the Application (client) ID and share it with us via Slack.

  1. Customize your app branding under Manage -> Branding & properties.

Setting up the File Picker UI

  1. Under Azure Services, select App Registration -> New registration.

  1. Select Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox) as the Supported account types.

  1. Under the Authentication tab, select Add a Platform -> Single Page Application.

  1. For the Redirect URI of the Single Page Application, you can use https://api.carbon.ai/static/loading.html or add a custom CNAME record pointing to https://api.carbon.ai. The domain path must still be /static/loading.html.

  1. Under the Authentciation’s Implicit grant and hybrid flows section, check Access tokens (used for implicit flows) and ID tokens (used for implicit and hybrid flows).

  1. Under Manage -> API permissions add the permissions Files.Read.All, Sites.Read.All, User.Read, AllSites.Read, and MyFiles.Read.

  1. Under Client credentials, click Add a certificate or secret -> New Client Secret. Then copy the client secret’s Value and share it with us via Slack.

  1. Navigate to the Overview tab then copy the Application (client) ID and share it with us via Slack.

Functionality

Carbon allows users to upload supported image, audio, video, and text files from SharePoint.

Synchronization

Syncs are triggered when end-users select files to upload via the SharePoint file selector UI. When a user selects a folder to be synced, we auto-sync all files added to the folder as well.

You can also use the resync_file API endpoint to programmatically resync specific SharePoint files. To delete SharePoint files from Carbon, you can use the delete_files endpoint directly.

To sync SharePoint files on a 24-hour schedule (more frequent schedules available upon request), you can use the /update_users endpoint. This endpoint allows organizations to customize syncing settings according to their requirements, with the option to enable syncing for all data sources using the string ‘ALL’. It’s important to note that each request supports up to 100 customer IDs.

Here’s an example illustrating how to automatically enable syncing for updated SharePoint content for specified users:

{
    "customer_ids": ["team@carbon.ai", "sam@openai.com"],
    "auto_sync_enabled_sources": ["SHAREPOINT"]
} 

Microsoft Admin Approval

To allow Carbon to access your Microsoft applications (OneDrive and SharePoints), users might need to request admin consent approval.

Here’s a step-by-step guide:

Prerequisites

Before you begin, ensure you have:

  • Gone through Carbon’s managed OAuth flow and submitted the admin consent request (see screenshot below):
  • An administrator role or designated reviewer role to review admin consent requests

Approve the Request

  1. Sign in to the Microsoft Entra admin center as at least a Cloud Application Administrator who is a designated reviewer.

  2. Navigate to Identity > Applications > Enterprise applications.

  3. Under Activity, select Admin consent requests.

  4. Select the My Pending tab to view and act on the pending requests.

  5. From the list, select the Carbon application that is being requested.

  6. Review the request details:

    • Select Review permissions and consent to see what permissions are being requested by Carbon.
    • Select the App details tab to view the application details.
    • Select the Requested by tab to see who is requesting access and why.
  7. Approve the request to grant admin consent to allow Carbon to access your Microsoft application. All requestors will be notified that their request for access is granted. This allows all users in your tenant to access Carbon unless otherwise restricted with user assignment.

Do You Have the Right Permissions?

If you are unable to consent to the approval request under My Pending because the admin consent flow has not been activated, then you will need Global Administrator permissions. Once you are a Global Administrator, you can set up the admin consent flow or consent directly via Carbon’s managed OAuth flow.