# Sharepoint Manual Site Setup

## 1. **Create a New Sites Target App**

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

<figure><img src="https://3232460952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIabFtGTeQzwfWCzp8vd6%2Fuploads%2F85AV1Ee1H9leguMEaEKb%2FBildschirmfoto%202025-09-23%20um%2011.27.18%20(1).png?alt=media&#x26;token=e8f1f9d9-08e8-4c53-8b0c-8e76a14073a5" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3232460952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIabFtGTeQzwfWCzp8vd6%2Fuploads%2FLc8cx8j2NFFq1SxQm12j%2FBildschirmfoto%202025-09-23%20um%2011.27.08.png?alt=media&#x26;token=906d3438-e90c-40b8-aef6-f758fddfbafb" alt=""><figcaption></figcaption></figure>

## **2. Grant Graph API Permission**

1. Navigate to `API permission` and `+ Add a permission` there. Use the `Application permission` option there.                &#x20;

<figure><img src="https://3232460952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIabFtGTeQzwfWCzp8vd6%2Fuploads%2F5dxK0R3r7xOnNEJUvYtn%2FBildschirmfoto%202025-09-23%20um%2011.27.12.png?alt=media&#x26;token=ca56c3e6-292c-4e75-8243-b4444d4cc689" alt=""><figcaption><p>Always use application permissions instead of delegated permissions</p></figcaption></figure>

2. In the Sites Admin App Registration, grant Graph API permissions for **`Sites.Selected`**.

<figure><img src="https://3232460952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIabFtGTeQzwfWCzp8vd6%2Fuploads%2Fr8iWqTo5oy4n7YbvizTQ%2Fimage%20(4).png?alt=media&#x26;token=2e1c3e4b-dc62-43a1-b321-4e40b56515be" alt=""><figcaption></figcaption></figure>

3. 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.

<figure><img src="https://3232460952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIabFtGTeQzwfWCzp8vd6%2Fuploads%2FeQASZfGwIXLqiWqkB2Lw%2FBildschirmfoto%202025-09-23%20um%2011.27.18.png?alt=media&#x26;token=61fd8374-859e-4f3e-b4dd-67fa07d8e386" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3232460952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIabFtGTeQzwfWCzp8vd6%2Fuploads%2FXD2D69DLPBRv88uwEC8J%2FBildschirmfoto%202025-09-23%20um%2011.27.21.png?alt=media&#x26;token=727fc56c-ec36-4ccb-834e-c94f48e22f8b" alt=""><figcaption></figcaption></figure>

3. Your text file should now include

<pre><code><strong>Client Id: 4dbceba4-*******-960918801231
</strong>Client Secret: JPz******************
Directory (tenant) ID: cef6ac5c-7bc6-*****-fdf0
</code></pre>

## 4. Manually **Grant SharePoint Site Access**

1. Follow the Step-by-Step guide to grant the Target App permissions for given Sharepoint sites: [manually-grant-sharepoint-site-access](https://docs.en.theblockbrain.ai/for-admins/classic-microsoft-integrations/create-a-sharepoint-connection/sharepoint-manual-site-setup/manually-grant-sharepoint-site-access "mention")

## **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.&#x20;

<figure><img src="https://3232460952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIabFtGTeQzwfWCzp8vd6%2Fuploads%2FTUhiYJnCJsof2fTRD2Cz%2FBildschirmfoto%202025-09-23%20um%2009.19.16.png?alt=media&#x26;token=a72a9315-2bdd-44d6-baee-e646b89f3f35" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3232460952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIabFtGTeQzwfWCzp8vd6%2Fuploads%2FLIIxbfhXOX2R17mp9MDI%2FScreenshot%202025-03-06%20at%2015.49.08.png?alt=media&#x26;token=3437cdc0-7e19-4e29-ad51-ee55cd8ad19e" alt=""><figcaption></figcaption></figure>

3. Choose the **`SharePoint Site Setup (No Admin Key)`** option.

<figure><img src="https://3232460952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIabFtGTeQzwfWCzp8vd6%2Fuploads%2FCJFkWPyr3oEeJKxRg8KO%2FScreenshot%202025-07-21%20at%2015.38.21-20250721-083827%20(2).png?alt=media&#x26;token=ef76b744-8d95-4a2a-b7c0-552f59ecb19e" alt=""><figcaption></figcaption></figure>

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

* **`Application (client) ID`** (Target App)
* **`Secret Key Value`** (NOT the Secret ID - of the Target App)
* **`Directory (tenant) ID`** (Target App)
* **`Site URL`** (Add all sites you want to connect)  &#x20;

<figure><img src="https://3232460952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIabFtGTeQzwfWCzp8vd6%2Fuploads%2FQvaixb7jBRntisV6cRXw%2FScreenshot%202025-07-21%20at%2016.15.47-20250721-091708.png?alt=media&#x26;token=71b0c9e4-1c9f-40ec-929e-a07fd66e5ecf" alt=""><figcaption></figcaption></figure>

5. After setup, you can always add or remove the sites at any time by clicking on the **`Re‑configure`** button.

<figure><img src="https://3232460952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIabFtGTeQzwfWCzp8vd6%2Fuploads%2Fe9fbSCscjQOpCFzfprH3%2FScreenshot%202025-07-21%20at%2016.21.00-20250721-092106.png?alt=media&#x26;token=dca59e65-16c2-4e01-9c02-c84ab0013f6c" alt=""><figcaption></figcaption></figure>

## 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](https://docs.en.theblockbrain.ai/for-admins/classic-microsoft-integrations/create-a-sharepoint-connection/connect-a-sharepoint-site-as-knowledge-base "mention")

## Best Practices & Troubleshooting <a href="#id-5.-best-practices-and-troubleshooting" id="id-5.-best-practices-and-troubleshooting"></a>

* **Credentials Accuracy**\
  Double‑check **`Client ID`**, **`Client Secret Key`**, and **`Tenant ID`** against your Azure AD app.
* **URL Format**\
  Ensure each URL begins with **`https://`** and follows **`/sites/<site-name>`**.
* **API Permissions**\
  Confirm the Azure AD app has been granted and consented for the required Graph scopes.
* **Scaling Up**\
  If you need to onboard many sites at once, consider the **Site Discovery** method with Admin Key.
