Outlook
The Carbon Connect enabledIntegrations
value for Outlook is OUTLOOK
.
Authorization Type
Carbon uses OAuth 2.0 to connect to Outlook.
Authorization Flow
Log into your Microsoft account.
After your account is authenticated, you will be directed to the following screen. Now your emails can be synced.
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/outlook 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/outlook
.
- Under
Manage
->API permissions
add the permissionsMail.Read
,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
.
Synchronization
After successfully connecting your Outlook account, you have the flexibility to choose which emails to sync using the filters and folder parameters via the integrations/outlook/sync
endpoint.
Filters Parameter
The filters parameter is a JSON object with key-value pairs, supporting AND and OR operations.
Below are the supported filter keys:
category
Custom categories created in Outlook.
after
Accepts a date in the format YYYY/mm/dd (e.g., 2023/12/31), enabling the retrieval of emails after a specified date.
before
Accepts a date in the format YYYY/mm/dd (e.g., 2023/12/31), enabling the retrieval of emails before a specified date.
from
Supports an email (email@address.com
) as a string from which the email was sent.
has
Supports the value attachment
as a string to filter for all emails sent from an account.
Here are some examples:
Folder Parameter
The folder parameter allows you to specify the folder from which to sync emails. By default, emails are retrieved from the inbox folder. To specify a custom folder, include it in the query:
Combining Filters and Operations
You can use AND and OR operations for more complex queries. Here’s an example:
You can use the resync_file
API endpoint to programmatically resync specific Outlook emails. To delete specific emails from Carbon, you can use the delete_files
endpoint directly.
To sync Outlook emails 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 Outlook 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
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.