If your organization possesses files stored in a SharePoint site, you might want your agents to leverage their content to answer users' queries. This can be done by creating an Azure application for SharePoint credential that will give access to your SharePoint tenant via an Azure application. These credentials can then be used to access a specific SharePoint site via a SharePoint content data source.
Note that connecting to your SharePoint can also be done via a SharePoint credential, which uses the standard credentials (username and password) of your SharePoint tenant.
Prerequisites
Before creating the credentials, you must first ensure you have created a dedicated application in Microsoft Azure (also known as Microsoft Entra).
Creating an application with the Sites.Selected permission
Open the Microsoft Azure Admin Portal.
Go to Identity > Applications > App registrations.
Click New registration.
Give the application a name. Select Accounts in this organizational directory only. Click Register.
Go to Manage > Certificates & secrets.
Click Client secrets > New client secret.
Give the client secret a description and an expiration date. Click Add.
Make sure to copy the value of the client secret now as it is only visible immediately after creation.
Go to Manage > API permissions.
Click Add a permission.
Select Microsoft Graph > Application permissions > Sites > Sites.Selected. Click Add permissions.
Ask an administrator to grant their content on the permission or click Grant admin consent if you are an administrator.
Go to Overview.
Copy the Application (client) ID and the Directory (tenant) ID.
Do not forget to copy the Application ID (Client ID), Directory ID (Tenant ID), and Client Secret, as these credentials will be used to create the Azure application for SharePoint credential.
Granting read permissions to the application
Ask an Azure Admin to explicitly grant read permissions on the SharePoint site specific to the application you just created.
Adding an Azure application for SharePoint credential
Below are the steps to create a new Azure application for SharePoint credential:
Go to Models & credentials.
Click Add credential to create a new credential;
Select the Azure application for SharePoint credential type;
Name your credential, e.g. SharePoint Azure application Jean;
Select who to share the credentials with. This will determine who can use your credentials in the data sources. If you want to keep these credentials private, select Only me. If you want to share them with other builders, select Builders.
Provide the Tenant URL of your SharePoint, for example,
https://company.sharepoint.com
.Provide the Tenant ID of the application.
Provide the Client ID of the application.
Provide the Client secret associated with the given Client ID.
Click Create.
The new credential is now available in the Credentials list. You can now use it when creating a new SharePoint content data source.
What’s next?
Learn how to create a SharePoint content data source that uses your credentials by reading this page: SharePoint content.