> For the complete documentation index, see [llms.txt](https://docs.blockbrain.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blockbrain.ai/for-admins/classic-microsoft-integrations/create-a-sharepoint-connection/sharepoint-manual-site-setup.md).

# 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="/files/7eZXJMAydB241bFQBJcz" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/yBn541hWhKIVzwBh9Cok" 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="/files/eGdBWFCyS7qmb9FXgBde" 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="/files/O1x9sx49ujhEFBh6vkH2" 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="/files/htO5tXljhRYwaI0ue3KI" 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="/files/HnqalQGoVCVK09GGVt7E" 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](/for-admins/classic-microsoft-integrations/create-a-sharepoint-connection/sharepoint-manual-site-setup/manually-grant-sharepoint-site-access.md)

## **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="/files/QTGFFIp3RU30Jk5hfK5D" 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="/files/Avmnt5HIWqbdITe5J6HJ" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/YnVRvhmN2wsZWTiLU6JC" 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="/files/Dx38kfBY4FSeRi8szAFV" 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="/files/AywU0Eb5lHDTAjd3HkkS" 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](/for-admins/classic-microsoft-integrations/create-a-sharepoint-connection/connect-a-sharepoint-site-as-knowledge-base.md)

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.blockbrain.ai/for-admins/classic-microsoft-integrations/create-a-sharepoint-connection/sharepoint-manual-site-setup.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
