Create a Sharepoint Connection

This guide provides a step-by-step walkthrough for setting up SharePoint folders as knowledge bases using Azure Active Directory applications.

1. Create a New Sites Admin App

Go to the Overview page and obtain the Application (client) ID and Directory (tenant) ID. Save this information in a text file.

Still want to avoid Admin App Permissions?

If you prefer to avoid giving admin app permissions, please integrate usingSharepoint Manual Site Setup.

(This will require you to use PnP PowerShell or Microsoft Graph API to manually grant the app access to specific SharePoint sites)

2. Grant Graph API Permission

  1. Navigate to API permission and + Add a permission there. Use the Application permission option there.

Always use application permissions instead of delegated permissions

  1. In the Sites Admin App Registration, grant Graph API permissions for Application.Read.All, Sites.FullControl.All.

Important: Why Sites.FullControl.All?

The far-reaching rights (Sites.FullControl.All) are only required for the one-off setup. Specifically:

  1. Admin Application:

  • The Admin App only needs Sites.FullControl.All to assign the required authorizations to the target application.

  • The access data of the Admin App is not saved permanently.

  1. After setup:

  • During operation, only the target application accesses SharePoint - and only the sites that are actually relevant.

  • The rights of the target application are restricted accordingly.

  1. Optional:

  • The admin app can even be deleted again once setup is complete.

Conclusion: The extensive rights are only temporary and only necessary for the initial configuration. During subsequent operation, only the minimum required rights are used.

  1. With admin rights, click the Grant admin consent link to approve the permissions.

3. Create a Client Secret Key

  1. Navigate to the Certificates & Secrets page to create client secrets.

  1. Copy the Secret Key Value (NOT the Secret ID) to the text file containing the Client ID and Tenant ID.

  1. Your text file should now include

Client Id: 4dbceba4-*******-960918801231
Client Secret: JPz******************
Directory (tenant) ID: cef6ac5c-7bc6-*****-fdf0

4. Create an additional Target Application

  1. Follow the same steps as above to register another application, which will serve as the target application for SharePoint integration.

  2. Ensure that this application also has Sites.Selected permissions.

  1. After registering, create a new Secret Key Value (NOT the Secret ID) and save it. Your target app text file should now include:

Client Id: 1ad09322-6c74-*****-8d736a2d9e92
Client Secret: Npn******************
Directory (tenant) ID: cef6ac5c-7bc6-*****-fdf05232c2f4

5. Configure SharePoint Integration in Blockbrain

  1. Access the Integrations Panel in Blockbrain by clicking on the Admin button at the top right corner of the screen.

  1. In the Integrations section, click on the SharePoint Integrations Connect button to begin setting up the integration.

  1. Choose the SharePoint Site Discovery (Admin Key Required) option.

  1. Enter the Admin Azure App Details in the pop-up window that will appear for configuring the integration.

  • Application (client) ID (Admin App)

  • Secret Key Value (NOT the Secret ID - of the Admin App)

  • Directory (tenant) ID (Admin App)

  1. Fetch all available sites by click on Get Sites. The system will display a list of SharePoint sites that you can connect to.

  1. From the list of available sites, select the ones you want to integrate with Blockbrain. Multiple sites can be selected by clicking on each option. Click on the Next button to finalise.

  1. In the final configuration screen, enter the Target Azure App Details from 4. Create an additional Target Application and click on the Save button to connect.

  • Application (client) ID (Target App)

  • Secret Key Value (NOT the Secret ID - of the Target App)

6. Connect a Sharepoint Site as Knowledge Base

  1. To connect a site to a knowledge base and use it with a bot, follow the instructions in Connect a Sharepoint Site as Knowledge Base

Best Practices & Troubleshooting

  • Credentials Accuracy Double‑check Client ID, Client Secret Key, and Tenant ID against your Azure AD app.

  • API Permissions Confirm the Azure AD app has been granted and consented for the required Graph scopes.

Last updated