OneDrive
The Carbon Connect enabledIntegrations
value for OneDrive is ONEDRIVE
.
Authorization Type
Carbon uses OAuth 2.0 to connect to OneDrive.
Functionality
Microsoft Office files are supported with our OneDrive integration, along with other text, audio, video, and image file formats.
Authorization Flow
Log into your Microsoft account.
Click the “Confirm” button to grant us permission to access OneDrive.
Click the “Select Files from OneDrive” button to open up the OneDrive file selector.
Click “Select” after selecting files to grant Carbon access to files.
Configuration
Custom OAuth Credentials
Setting up the OAuth App
-
Create or log into your Microsoft Azure Account.
-
Under
Azure Services
, selectApp Registration
->New registration
.
- Select
Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)
as theSupported account types
.
- Add https://api.carbon.ai/integrations/onedrive as the
Redirect URI
and selectWeb
under theSelect a platform
dropdown. You can also opt to use a custom CNAME record pointing to https://api.carbon.ai. The domain path must still be/integrations/onedrive
.
- Under
Manage
->API permissions
, selectMicrosoft Graph
->Delegated permissions
then add the permissionsFiles.Read.All
,offline_access
,openid
, andUser.Read
.
- Under
Client credentials
, clickAdd a certificate or secret
->New Client Secret
. Then copy the client secret’sValue
and share it with us via Slack.
- Navigate to the
Overview
tab then copy theApplication (client) ID
and share it with us via Slack.
- Customize your app branding under
Manage
->Branding & properties
.
Setting up the File Picker UI
- Under
Azure Services
, selectApp Registration
->New registration
.
- Select
Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)
as theSupported account types
.
- Under the
Authentication
tab, selectAdd a Platform
->Single Page Application
.
- For the
Redirect URI
of theSingle 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
.
- Under the
Authentciation
’sImplicit grant and hybrid flows
section, checkAccess tokens (used for implicit flows)
andID tokens (used for implicit and hybrid flows)
.
- Under
Manage
->API permissions
add the permissionsFiles.Read.All
,Sites.Read.All
,User.Read
,AllSites.Read
, andMyFiles.Read
.
- Under
Client credentials
, clickAdd a certificate or secret
->New Client Secret
. Then copy the client secret’sValue
and share it with us via Slack.
- Navigate to the
Overview
tab then copy theApplication (client) ID
and share it with us via Slack.
Functionality
Carbon allows users to upload pdf
, docx
, pptx
,txt
,csv
, png
, rtf
, tsv
, xlsx
, jpeg
and md
files directly from OneDrive.
Synchronization
Syncs are triggered when end-users select files to upload via the OneDrive 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 OneDrive files. To delete OneDrive files from Carbon, you can use the delete_files
endpoint directly.
To sync OneDrive 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 OneDrive content for specified users:
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
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
-
Sign in to the Microsoft Entra admin center as at least a Cloud Application Administrator who is a designated reviewer.
-
Navigate to Identity > Applications > Enterprise applications.
-
Under Activity, select Admin consent requests.
-
Select the My Pending tab to view and act on the pending requests.
-
From the list, select the Carbon application that is being requested.
-
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.
-
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.