Set Up the OneDrive/SharePoint Connector
The OneDrive/SharePoint Connector allows you to ingest documents from your Microsoft 365 storage directly into your project. To use the connector, you will authenticate via your Azure account. Decide on OAuth configuration - Airia managed with required scopes for all Microsoft integrations or Bring your own OAuth connector with custom scopes that best fit your integration and security requirements.Set Up with Airia managed OAuth
This one-time setup registers the Airia Microsoft Connector application in your Azure Active Directory (Microsoft Entra ID), allowing it to access organizational data from OneDrive and SharePoint.💡 Note:
- Application Name:
Airia Connector – Web- Your tenant ID: you can see it in platform settings
- Construct Admin Consent URL
Use the following format, replacing
<CUSTOMER_TENANT_ID>with your specific Microsoft tenant ID:https://login.microsoftonline.com/<CUSTOMER_TENANT_ID>/adminconsent?client_id=4969aaba-cdb0-4777-829d-63a9dde52671💡 Example:
https://login.microsoftonline.com/your-tenant-id-here/adminconsent?client_id=4969aaba-cdb0-4777-829d-63a9dde52671 - Open Consent URL Open the constructed URL in a web browser (preferably in an incognito or private browsing window).
- Log In as Azure Admin Log in using an Azure Admin user account that has permissions to grant consent for enterprise applications.
- Review and Grant Consent
Review the requested permissions displayed on the screen and click Accept or Grant consent to approve them on behalf of your organization.
💡 Note: After successful consent, the browser will redirect back to the Airia platform.
- Confirm Application Registration
Log into the Microsoft Entra ID portal and navigate to Enterprise applications. Confirm that
Airia Connector – Webis listed in this section.
Set up with your custom managed OAuth
This guide explains how to configure SharePoint with Site Selected access, SharePoint with all sites read access and OneDrive connectors in Azure AD and integrate it with Airia, allowing Airia to access specific SharePoint sites.Configure Your Azure AD App
1. Register Your Application in Azure AD
- Navigate to Azure Portal > Microsoft Entra ID > App registrations.
- Click New registration.
- Configure the application details:
- Name: Enter a descriptive name, such as
Airia SharePoint Site Selected. - Supported account types: Select
Accounts in any organizational directory. - Redirect URI: Enter
Airia Chat.
- Name: Enter a descriptive name, such as
- Click Register.
- From the app’s Overview page, save the Application (client) ID. You will need this later.
2. Configure API Permissions
- In your registered application’s left menu, navigate to API permissions.
- Click Add a permission.
- Select Microsoft Graph.
- Choose Application permissions.
- Add the following permissions:
For more limited permissions add the following scopes. Note that Microsoft Admin is required to whitelist the sites for syncing. Only one site can be ingested in a given data source.
User.ReadSites.Selectedoffline.access- (Optional for permission-aware RAG)
Directory.Read.All
Sites.Read.Alloffline.accessFiles.ReadFiles.ReadWriteUser.Read
offline.accessFiles.ReadFiles.ReadWriteUser.Read
- Click Add permissions.
- Click Grant admin consent for [Your Tenant Name] and confirm.
💡 Note: If permission-aware RAG (where the AI agent respects end-user permissions) is required,Directory.Read.Allis necessary. This scope often replaces the need forUser.Read.All,Group.Read.All, andGroupMember.Read.Allin most read-only scenarios.
3. Obtain Your Client Secret
- In your registered application’s left menu, navigate to Certificates & secrets.
- Click New client secret.
- Provide a Description (e.g.,
Airia Client Secret) and set an appropriate Expires duration. - Click Add.
- Copy the Value of the client secret immediately. It will only be shown once and is required for Airia integration.
Grant Site-Level Permissions Using Graph Explorer (required if you listed sites.selected scope for SharePoint only)
Before granting your app access, you need to obtain the specific SharePoint Site ID.Prerequisites
- Access to Graph Explorer.
- A Global Administrator or SharePoint Administrator account to sign into Graph Explorer.
1. Grant Temporary Admin Permissions for Setup
- Open Graph Explorer and sign in with a Global Administrator or SharePoint Administrator account.
- In Graph Explorer, navigate to the Permissions tab.
- Enable and consent to the
Sites.FullControl.Allpermission. - Click Consent.
⚠️ Warning: This permission is only for your admin session to configure site access. You can revoke it after completing this phase if desired.
2. Get Your SharePoint Site ID
-
In Graph Explorer, make a
GETrequest to retrieve the site ID.- Replace
{hostname}with your SharePoint hostname (e.g.,yourcompany.sharepoint.com). - Replace
{site-name}with the name of your SharePoint site.
- Replace
-
From the response, copy the entire
idfield. This is your Site ID.
3. Grant Your App Access to the SharePoint Site
-
In Graph Explorer, make a
POSTrequest to grant your registered app read permissions to the specific SharePoint site.- Replace
{site-id}with the Site ID you obtained in the previous step. - Replace
{application-id}with the Application (client) ID you saved from Azure AD (Phase 1, Step 1). - Replace
{application-display-name}with the display name of your registered application (e.g.,Airia SharePoint Site Selected).
- Replace
4. Verify App Access (Optional)
-
To confirm the permissions were set correctly, make a
GETrequest in Graph Explorer. Replace{site-id}with your SharePoint Site ID. -
The response should include an entry for your application with the
readrole.
Create Your OAuth Connector in Airia
1. Add a New Microsoft OAuth Connector
- In the Airia platform, navigate to Settings > OAuth connectors.
- Select the Microsoft card.
- Enter the following details for your new OAuth connector:
- Name: A descriptive name (e.g.,
SharePoint Site Selected Connector). - Client ID: The Application (client) ID you saved from Azure AD (Phase 1, Step 1).
- Client Secret: The client secret value you saved from Azure AD (Phase 1, Step 3).
- Scopes: Add the following scopes (matching those configured in Azure AD):
User.ReadSites.Selectedoffline.access- (Optional for permission-aware RAG)
Directory.Read.All
- Name: A descriptive name (e.g.,
- Click Create.
Create a SharePoint Data Source
1. Add a New SharePoint Data Source
- In the Airia platform, navigate to Available data sources.
- Select the SharePoint card.
2. Configure Data Source Details
- Provide the following details:
- Name: A mandatory, descriptive name for your data source (e.g.,
SharePoint Site Selected Data). - Description: (Optional) A brief description.
- Scope: Select the Airia project for this data source.
- OAuth connector: From the dropdown, select the Microsoft OAuth connector you created in Phase 3 or Airia managed OAuth.
- Name: A mandatory, descriptive name for your data source (e.g.,
- For Credentials, choose
Create new credential(this is the only option if you just created the OAuth connector). - Enter a Name for the new credential.
- Confirm the required scopes for the user authenticating that match the scopes for the Oauth configuration.
- Click Authenticate. Complete the OAuth flow by logging in with an account that has access to the SharePoint site.
3. Specify SharePoint Site (only for sites.selected) and Ingestion Settings
- Enter the Site ID or Site URL of the SharePoint site you wish to sync (obtained in Phase 2, Step 2).
- Enable permission check or user specific if access control is required for the files in the data source.
- (Optional) Configure the ingestion settings based on your specific use case and data requirements.
- Click Next
4. Select Folders and Start Ingestion
Browse and select the content you want to ingest. You can select and deselect individual items. Supported content types for ingestion include:- SharePoint sites
- SharePoint subsites
- SharePoint document libraries
- Folders
- Files
- Shared content
💡 Tip: Selecting a SharePoint site, library, or folder will sync all supported content within it, including files, subfolders, and their content. Reprocessing the data source will automatically sync newly added content, update modified content, and delete removed items within the selected content. 💡 Note: To edit your content selection, go to the data source and click Edit. You may need to reauthenticate. Then click Next to make your new selections. If you reauthenticate with new user credentials, the content selector will not show previous selections, and you will need to reselect all desired items.
Permissions Enforcement
Airia filters query results based on the end-user’s access permissions in OneDrive/Sharepoint.Prerequisites
To enable permission enforcement for your data source:- Single Sign-On (SSO) must be enabled for your Airia project.
- Permission check must be enabled when configuring the specific data source (e.g., when setting up the OneDrive/SharePoint data source).
