> 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/agents/ms-teams-agent.md).

# MS Teams Agent

This page provides detailed configuration instructions for the MS Teams Agent, which enables integration with MS Teams for messaging, meeting and file management

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td><strong>Overview</strong></td><td><ul><li>Search and retrieve Teams messages, chats, and channel conversations through Blockbrain</li><li>Send messages to Teams channels or chats</li><li>Access and manage Teams meetings, including scheduling and joining</li><li>Retrieve and share files stored in Teams channels</li><li>Access team, channel, and user metadata for collaboration and automation</li><li>Automate workflows and notifications across Microsoft Teams</li></ul></td><td><a href="https://3232460952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIabFtGTeQzwfWCzp8vd6%2Fuploads%2FUwHxKX9rpt3NC6yRBTXA%2FScreenshot%202025-12-04%20at%2013.51.34.png?alt=media&amp;token=c5a58bce-5ede-4ad9-985e-556b4ebeed5e">Screenshot 2025-12-04 at 13.51.34.png</a></td></tr><tr><td><strong>Prerequisites</strong></td><td><ul><li>Complete the <a href="https://docs.en.theblockbrain.ai/for-users/agents">general setup steps</a> from the main AI Agents page</li><li>Ensure users have active Microsoft 365 accounts with access to Microsoft Teams</li><li>Verify appropriate Microsoft 365 licensing for Teams and related services</li></ul></td><td><a href="https://3232460952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIabFtGTeQzwfWCzp8vd6%2Fuploads%2Fvi22Kf04WdMUhdg0dI0h%2FScreenshot%202025-12-04%20at%2013.51.48.png?alt=media&amp;token=cc189408-a272-40e5-988b-b7486983d97e">Screenshot 2025-12-04 at 13.51.48.png</a></td></tr></tbody></table>

Connect the MS Teams Agent to your Microsoft 365 tenant: register an app in Microsoft Entra ID, grant admin consent and enter the values in Blockbrain.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIabFtGTeQzwfWCzp8vd6%2Fuploads%2FeTiH9iCdP28xXYWNg7kY%2FT1-v2-draft-light-av.mp4?alt=media&token=a1918fa5-5f3d-46c0-976c-fffb4388dabd>" %}

The MS Teams Agent lets your users work with Microsoft Teams from Blockbrain. It reads teams, channels, chats and channel files, summarizes conversations and finds mentions. With the user's approval, it sends messages, sets presence and creates, updates or cancels Teams meetings. It always acts as the signed-in user and sees only what that user can see in Teams.

### At a glance

| Item                             | Detail                                                                                                                                                                                                               |
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Time**                         | About 15 minutes                                                                                                                                                                                                     |
| **Minimum Microsoft Entra role** | Application Developer, to register the app and create the secret. Cloud Application Administrator or Application Administrator, to grant admin consent. One person with Cloud Application Administrator can do both. |
| **Blockbrain role**              | Administrator of your Blockbrain workspace                                                                                                                                                                           |

### Before you start

* You need access to the Microsoft Entra admin center with the roles above, and to the **Admin** area in Blockbrain.
* Your users need Microsoft 365 accounts with Microsoft Teams.
* Optional: the meeting transcript tools need **Transcript API Access** to be turned on in the Teams admin center, under the meeting settings. Your Teams administrator manages this setting. The other tools work without it.

{% hint style="info" %}
**If someone else manages Microsoft Entra ID in your organization,** send them this page. Ask them to complete the four **In Entra** steps under **Set up** and to send you three values: the **Application (client) ID**, the **Directory (tenant) ID** and the client secret **Value**. Use a secure channel for the secret.
{% endhint %}

### Values you'll paste

#### Redirect URI

Add the redirect URI that matches the Blockbrain environment your workspace runs in. If your Blockbrain address ends in `.eu-1.theblockbrain.ai`, use **EU Sovereign (StackIT)**; otherwise use **Blockbrain Default**. If you are not sure, add both: an unused redirect URI does no harm.

{% tabs %}
{% tab title="Blockbrain Default" %}
{% code title="Redirect URI (Web)" %}

```
https://nango.theblockbrain.ai/oauth/callback
```

{% endcode %}
{% endtab %}

{% tab title="EU Sovereign (StackIT)" %}
{% code title="Redirect URI (Web)" %}

```
https://nango.eu-1.theblockbrain.ai/oauth/callback
```

{% endcode %}
{% endtab %}
{% endtabs %}

#### Scopes

{% code title="Scopes (Microsoft Graph)" %}

```
https://graph.microsoft.com/.default
offline_access
openid
```

{% endcode %}

`https://graph.microsoft.com/.default` requests every Microsoft Graph permission on the app registration. The permission list in Microsoft Entra ID is then the only list you maintain.

<details>

<summary>Explicit scope list, if your policy does not allow <code>.default</code></summary>

Enter each value as its own entry, or paste the comma-separated line below in one go. Keep this list identical to the permissions on the app registration.

{% code title="Scopes (explicit list)" %}

```
User.Read
User.ReadBasic.All
Team.ReadBasic.All
Channel.ReadBasic.All
TeamMember.Read.All
ChannelMember.Read.All
ChannelMessage.Read.All
ChannelMessage.Send
Chat.ReadWrite
Files.Read.All
Presence.ReadWrite
Calendars.ReadWrite
OnlineMeetings.ReadWrite
OnlineMeetingTranscript.Read.All
offline_access
openid
```

{% endcode %}

The same list as one line. The **Scopes** field splits it at the commas. The optional transcript scope is last: to leave it out, delete everything from the last comma.

{% code title="Scopes (one line, comma-separated)" %}

```
openid,offline_access,User.Read,User.ReadBasic.All,Team.ReadBasic.All,TeamMember.Read.All,Channel.ReadBasic.All,ChannelMember.Read.All,ChannelMessage.Read.All,ChannelMessage.Send,Chat.ReadWrite,Files.Read.All,Calendars.ReadWrite,OnlineMeetings.ReadWrite,Presence.ReadWrite,OnlineMeetingTranscript.Read.All
```

{% endcode %}

</details>

#### Additional Configuration

{% code title="Additional Configuration key" %}

```
tenant
```

{% endcode %}

The value is your **Directory (tenant) ID**, from the app's **Overview** page in Microsoft Entra ID.

#### Admin consent URL

An administrator can grant admin consent in the Microsoft Entra admin center, or by opening this URL. Replace `{tenant-id}` with your Directory (tenant) ID or a verified domain of your organization, and `{client-id}` with the Application (client) ID of the app registration.

{% code title="Admin consent URL" %}

```
https://login.microsoftonline.com/{tenant-id}/adminconsent?client_id={client-id}
```

{% endcode %}

The URL grants the permissions that are configured on the app registration at that moment. If you add a permission later, grant consent again.

Sign in with an administrator account. Microsoft shows **Permissions requested** with the list of permissions; select **Accept**. Afterwards the browser opens the Blockbrain redirect URI and shows **Connection failed** with the detail "No state found in callback". You can close that window: the consent is granted, and the address ends with `admin_consent=True`. To confirm, open the app registration's **API permissions** page and check that every permission shows **Granted for** your organization. If you sign in with an account that isn't an administrator, Microsoft asks for admin approval instead.

Who can grant it:

* **Cloud Application Administrator**, **AI Administrator** or **Application Administrator**: any permission except Microsoft Graph application permissions.
* **Privileged Role Administrator**: all permissions, including Microsoft Graph application permissions.

Source: [Grant tenant-wide admin consent to an application](https://learn.microsoft.com/en-us/entra/identity/enterprise-apps/grant-admin-consent) on Microsoft Learn.

### Set up

{% stepper %}
{% step %}

#### In Entra: register the app

1. Sign in to the [Microsoft Entra admin center](https://entra.microsoft.com) and open **App registrations**.
2. Select **New registration**.
3. Enter a name that tells your colleagues what the app is for, for example `Blockbrain <agent name>`. Use one app registration per Blockbrain agent.
4. Under **Supported account types**, keep the default: **Single tenant only**, followed by your organization's name.
5. Under **Redirect URI**, select **Web** as the platform and paste the redirect URI for your Blockbrain environment from **Values you'll paste**.
6. Select **Register**.
7. On the app's **Overview** page, copy the **Application (client) ID** and the **Directory (tenant) ID**. You enter both in Blockbrain later.

If you need both redirect URIs, add the second one after registration: in the app registration, open **Authentication (Preview)**, select **Add Redirect URI** → **Web**, paste the URI and select **Configure**.

{% hint style="warning" %}
Choose **Web** as the redirect URI platform. A single-page application or mobile platform stops sign-in with **AADSTS50011**. Then copy the **Application (client) ID**, not one of the other IDs on the page. A wrong client ID or tenant ID stops sign-in with **AADSTS700016**.
{% endhint %}
{% endstep %}

{% step %}

#### In Entra: add the permissions

1. In the app registration, open **API permissions**.
2. Select **Add a permission** → **Microsoft Graph** → **Delegated permissions**.
3. Select every permission from the read and write tables under **Permissions** on this page. `User.Read` is already listed on a new app registration. Leave out an optional permission only if you don't want the tools that need it.
4. Select **Add permissions**.

{% hint style="warning" %}
Do not enter `Chat.ReadBasic.All` in **Scopes**. It exists only as an application permission and stops sign-in with **AADSTS650053**. The permission that reads channel names is `Channel.ReadBasic.All`.
{% endhint %}
{% endstep %}

{% step %}

#### In Entra: grant admin consent

Still under **API permissions**, select **Grant admin consent for** your organization, and confirm with **Yes**. Microsoft asks whether to grant consent "for all accounts" in your organization: this is expected. Every permission then shows **Granted for** your organization.

To pilot with a few users first, open **Enterprise applications** → the app → **Properties**, set **Assignment required?** to **Yes**, select **Save**, and add the pilot users under **Users and groups**. The administrator who registered the app is assigned automatically; remove that assignment if the administrator should not use the agent.

You can also send the admin consent URL from **Values you'll paste** to an administrator who holds one of the roles listed there.

{% hint style="warning" %}
This step is required for the MS Teams Agent. Four of its permissions need admin consent: `TeamMember.Read.All`, `ChannelMember.Read.All`, `ChannelMessage.Read.All` and `OnlineMeetingTranscript.Read.All`. If an administrator consents only for their own account, other users get **403 Forbidden** when the agent reads channel messages.
{% endhint %}
{% endstep %}

{% step %}

#### In Entra: create a client secret

1. In the app registration, open **Certificates & secrets**.
2. Select **New client secret**, enter a description and choose an expiry period.
3. Select **Add**.
4. Copy the secret's **Value** right away, with the copy icon in the **Value** column. Microsoft Entra ID shows it only once: after you leave the page, only its first characters remain visible. The **Secret ID** column next to it holds a different value. Keep the value in your password manager: you need it again when you change the **Scopes** in Blockbrain. If it is lost, create a new secret.
5. Note the expiry date in your team's calendar, so the secret is replaced before it runs out. See **Maintain** on this page.

{% hint style="warning" %}
Copy the **Value** column, not the **Secret ID**. Blockbrain needs the value. A secret ID in the **Client Secret** field stops sign-in with **AADSTS7000215**.
{% endhint %}
{% endstep %}

{% step %}

#### In Blockbrain: enter the values

The connector is **Microsoft Teams**.

1. In Blockbrain, go to **Admin** → **Agents** → **Tools**, and select the **Connectors** filter.
2. In the row of the connector this page names, select **Install**. The **Tool Configuration** window opens.
3. Enter the values from Microsoft Entra ID:
   * **Client ID**: the Application (client) ID.
   * **Client Secret**: the secret **Value**.
4. In **Scopes**, enter the scope values from **Values you'll paste**: type a value, then select **Add** or press **Enter**. To add the explicit list in one go, paste it as one comma-separated line. Don't separate values with spaces: Blockbrain then keeps them as a single entry and can't save it.
5. Under **Additional Configuration**, enter `tenant` as the **Key** and your Directory (tenant) ID as the **Value**.
6. Select **Save**. Blockbrain confirms with "Tool updated successfully!".

{% hint style="warning" %}
The `tenant` entry under **Additional Configuration** is required. There is no separate tenant field. Without the `tenant` key, **Save** still succeeds, but **Connect** fails without opening the Microsoft sign-in window.
{% endhint %}

Optional: under **Tool Configurations**, **Include Disclaimer** adds a note to the chat messages the agent sends for a user. Enter the text in **Disclaimer Message**.
{% endstep %}
{% endstepper %}

### Check it works

Blockbrain has no built-in connection test for Microsoft agents. Check the connection with a real request instead:

1. In Microsoft Entra ID, confirm that every permission under **API permissions** shows **Granted for** your organization.
2. In Blockbrain, go to **Admin** → **Agents** → **Tools** → **Connectors**, select **Connect** in the **Microsoft Teams** row, then **Connect** in the window that opens.
3. Sign in with your Microsoft work account. If the browser is signed in with another Microsoft account, for example an administrator account, select **Use another account**. The row then shows **Connected**.
4. Open a chat: go to **Bots**, add a bot to your list if it is empty, and open it.
5. Send this test prompt. It only reads data. Replace the team and channel names with ones you are a member of.

{% code title="Test prompt" %}

```
Summarize the last five messages in the General channel of the Project Demo team.
```

{% endcode %}

The agent returns a summary of the latest messages in that channel.

### Permissions

All permissions are **delegated** Microsoft Graph permissions: the agent acts as the signed-in user and reaches only the teams, channels, chats and files that user can access. The MS Teams Agent needs no application permissions.

**Default** permissions are needed for the agent's core tools. **Optional** permissions are needed only by the tools named in their row. If you leave one out, those tools can't work.

#### Read permissions

| Permission                         | Why the agent needs it                                                                                                                                         | Admin consent | Default or optional        |
| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -------------------------- |
| `User.Read`                        | Reads the signed-in user's own profile, for example to set presence and resolve mentions.                                                                      | No            | Default                    |
| `User.ReadBasic.All`               | Searches users and reads their basic profile, for example to find a colleague or resolve a mention.                                                            | No            | Default                    |
| `Team.ReadBasic.All`               | Lists the teams the user has joined and reads their details.                                                                                                   | No            | Default                    |
| `Channel.ReadBasic.All`            | Lists a team's channels and reads their properties. Every channel tool depends on this.                                                                        | No            | Default                    |
| `TeamMember.Read.All`              | Lists the members of a team.                                                                                                                                   | **Yes**       | Default                    |
| `ChannelMember.Read.All`           | Lists the members of a channel.                                                                                                                                | **Yes**       | Default                    |
| `ChannelMessage.Read.All`          | Reads channel messages and their replies. Also required for every message search, recent activity and the user's mentions, even when only chat messages match. | **Yes**       | Default                    |
| `Files.Read.All`                   | Reads channel files and the user's OneDrive files: lists folders, reads file details and searches files.                                                       | No            | Default                    |
| `OnlineMeetingTranscript.Read.All` | Lists and reads meeting transcripts. Also needs **Transcript API Access** to be on in the Teams admin center.                                                  | **Yes**       | Optional: transcript tools |
| `offline_access`                   | Renews access without a new sign-in. Without it, the connection stops working after about an hour.                                                             | No            | Default                    |
| `openid`                           | Signs the user in.                                                                                                                                             | No            | Default                    |

#### Write permissions

The tools that change something in Microsoft Teams ask the user for approval before they run: sending a channel or chat message, creating a chat, setting presence, and creating, updating or cancelling a meeting.

| Permission                 | Why the agent needs it                                                                                                                                                        | Admin consent | Default or optional       |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | ------------------------- |
| `Chat.ReadWrite`           | Lists the user's chats and reads their messages. With approval, sends chat messages and creates chats. Message search also needs it, together with `ChannelMessage.Read.All`. | No            | Default                   |
| `ChannelMessage.Send`      | With approval, posts a message to a channel.                                                                                                                                  | No            | Optional: send to channel |
| `Presence.ReadWrite`       | With approval, sets the user's presence status.                                                                                                                               | No            | Optional: set presence    |
| `Calendars.ReadWrite`      | Lists the user's Teams meetings. With approval, creates, updates and cancels them. Creating or updating a meeting sends invitations to the attendees.                         | No            | Optional: meeting tools   |
| `OnlineMeetings.ReadWrite` | Looks up a Teams meeting from its join link.                                                                                                                                  | No            | Optional: meeting tools   |

### Troubleshooting

#### MS Teams Agent

| What you see                                                                                                                                       | Why                                                                                                                                                                                                | Fix                                                                                                                                                                                                                                             |
| -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| At sign-in, Microsoft says a requested permission doesn't exist `AADSTS650053`                                                                     | `Chat.ReadBasic.All` is in the **Scopes** field.                                                                                                                                                   | Remove `Chat.ReadBasic.All` from **Scopes**. It exists only as an application permission. The permission that reads channel names is `Channel.ReadBasic.All`. Users then disconnect and select **Connect** again.                               |
| The agent says access to channel messages was denied and names `ChannelMessage.Read.All` `403 Forbidden: Missing scope permissions on the request` | `ChannelMessage.Read.All` is missing, or admin consent was not granted for the organization. Sign-in still works in this case, so the error appears only when the agent reads messages.            | Add `ChannelMessage.Read.All` and grant admin consent for the organization. Then each user selects **Connected** → **Disconnect**, then **Connect**. Until a user reconnects, the error stays, even after consent is granted.                   |
| The agent can't read meeting transcripts `403 Forbidden` with `GraphAccessToTranscriptsDisabled`                                                   | **Transcript API Access** is turned off in the Teams admin center. Microsoft returns this error whatever permissions were consented, and Microsoft Learn says there is no request-side workaround. | Ask your Teams administrator to turn on **Transcript API Access** in the Teams admin center, under the meeting settings. See [List transcripts](https://learn.microsoft.com/en-us/graph/api/onlinemeeting-list-transcripts) on Microsoft Learn. |

#### Sign-in and connection

Blockbrain shows only a general message when **Connect** fails, for example "Failed to connect to Microsoft Teams (Tenant)". To find the exact error code, open the Microsoft Entra admin center → **Enterprise applications** → the app → **Sign-in logs**:

* **User sign-ins (interactive)** shows errors during the user's sign-in, such as a missing assignment or consent.
* **User sign-ins (non-interactive)** shows errors when Blockbrain redeems the sign-in, such as a wrong client secret. In this case the interactive sign-in shows **Success**. Expand the entry and open it to see the **Sign-in error code**.

New entries can take a few minutes to appear.

| What you see                                                                                                       | Why                                                                                                                                                                                                                        | Fix                                                                                                                                                                                              |
| ------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Connect** fails right away and no Microsoft sign-in window opens. Blockbrain shows only "Failed to connect to …" | The `tenant` key is missing under **Additional Configuration**. **Save** still succeeds without it.                                                                                                                        | Add the key `tenant` with your Directory (tenant) ID as the value, then select **Save**.                                                                                                         |
| **Save** in Blockbrain does nothing, and the window stays open                                                     | Several scopes were entered as one entry, separated by spaces.                                                                                                                                                             | Remove that entry. Add each scope on its own, or paste the values as one line separated by commas.                                                                                               |
| Microsoft says the redirect URI doesn't match `AADSTS50011`                                                        | The redirect URI for your Blockbrain environment is missing, or it was registered under a platform other than **Web**.                                                                                                     | In the app registration, open **Authentication (Preview)** and add the redirect URI under the **Web** platform.                                                                                  |
| Microsoft says it can't find the app `AADSTS700016`                                                                | The client ID or the tenant ID is wrong.                                                                                                                                                                                   | Compare **Client ID** and the `tenant` value in Blockbrain with the app's **Overview** page.                                                                                                     |
| Microsoft says the tenant doesn't exist `AADSTS90002` or `AADSTS900023`                                            | The tenant ID is not valid or does not exist.                                                                                                                                                                              | Correct the `tenant` value under **Additional Configuration**.                                                                                                                                   |
| **Connect** fails although the Microsoft sign-in succeeded `AADSTS7000215`                                         | The **Secret ID** was entered instead of the secret **Value**. The code appears only under **User sign-ins (non-interactive)**.                                                                                            | Microsoft shows the value only once. Create a new client secret, copy its **Value**, paste it into **Client Secret**, select **Save**, and select **Connect** again. Then delete the old secret. |
| Microsoft says the client secret has expired `AADSTS7000222`                                                       | Client secrets have an expiry date, and this one has passed.                                                                                                                                                               | Create a new secret and enter its value in Blockbrain. See **Maintain**.                                                                                                                         |
| Microsoft says an administrator needs to approve the app `AADSTS65001` or `AADSTS90094`                            | Consent for the app has not been granted, and users in your organization are not allowed to consent themselves.                                                                                                            | An administrator grants admin consent in Microsoft Entra ID, or opens the admin consent URL.                                                                                                     |
| At sign-in, Microsoft says a requested permission doesn't exist `AADSTS650053`                                     | The **Scopes** field names a permission the API does not offer: an application-only permission, or a permission for an API other than Microsoft Graph entered without its resource. Bare names resolve to Microsoft Graph. | Use the scope values from **Values you'll paste** exactly as shown.                                                                                                                              |
| Microsoft says the requested scopes can't be combined `AADSTS28000`                                                | The **Scopes** field mixes scopes from more than one API.                                                                                                                                                                  | Keep one API per scope field. Use one app registration per Blockbrain agent.                                                                                                                     |
| Microsoft says the user isn't assigned to the app `AADSTS50105`                                                    | The app requires user assignment, and the user is not assigned.                                                                                                                                                            | Assign the user, or a group they belong to, to the app under **Enterprise applications** in Microsoft Entra ID.                                                                                  |
| Microsoft says access is blocked by a Conditional Access policy `AADSTS53003`                                      | A Conditional Access policy blocked the sign-in.                                                                                                                                                                           | Your Microsoft Entra administrator reviews the policy for this app.                                                                                                                              |
| The agent works for the administrator but not for other users `403 Forbidden`                                      | Consent was granted for the administrator's own account only.                                                                                                                                                              | Grant admin consent for the whole organization. Users then disconnect and select **Connect** again.                                                                                              |
| The connection stops working after about an hour                                                                   | `offline_access` is missing from **Scopes**, so Blockbrain cannot renew access.                                                                                                                                            | Add `offline_access` to **Scopes**, select **Save**, and ask users to reconnect.                                                                                                                 |
| A newly added permission has no effect                                                                             | Existing connections keep the permissions they were created with.                                                                                                                                                          | Grant admin consent again. Users disconnect and select **Connect** again.                                                                                                                        |

### Security, access and removal

* **What Blockbrain stores:** the **Client ID**, the **Client Secret**, the **Scopes** values and the `tenant` key you enter in the connector configuration. For each user who selects **Connect**, Blockbrain also stores that user's access and refresh tokens.
* **What the agent can reach:** only what the signed-in user can already access in Microsoft Teams. All permissions are delegated, so there is no organization-wide background access.
* **Approvals:** every tool that sends, creates, updates, cancels or sets something asks the user before it runs.
* **Remove one permission:** see **Change permissions** under **Maintain**.
* **Remove the agent for everyone:** delete the client secret or the app registration in Microsoft Entra ID. Without a valid client secret, Blockbrain can't renew access for any user.

### Maintain

#### Rotate the client secret

Client secrets expire. When a secret has expired, sign-in fails with **AADSTS7000222**. Replace the secret before its expiry date:

1. In Microsoft Entra ID, open the app registration → **Certificates & secrets** and create a new client secret. Copy its **Value**.
2. In Blockbrain, go to **Admin** → **Agents** → **Tools**, open the connector's configuration, paste the new value into **Client Secret** and select **Save**.
3. Check that the agent still works: run the test prompt from **Check it works**. Users who are already connected keep working; they don't need to connect again.
4. Delete the old secret in Microsoft Entra ID.

#### Change permissions

When you add or remove a permission:

1. Change the permission on the app registration in Microsoft Entra ID → **API permissions**.
2. Grant admin consent again, so the change applies to everyone in your organization.
3. If you also change the **Scopes** field in Blockbrain, enter the client secret **Value** in **Client Secret** again before you select **Save**. The field looks empty when you reopen the window, and without the secret the scope change may not reach the connection. If you no longer have the value, create a new secret as described under **Rotate the client secret**.
4. Ask each user to disconnect and connect again: in the connector's row, select **Connected** → **Disconnect**, then **Connect**. Existing connections keep the permissions they were created with.

Removing a permission from the app registration does not withdraw consent that was already granted. The permission then appears under **Other permissions granted for** your organization on the same **API permissions** page. To withdraw it, select **…** in its row → **Revoke admin consent** → **Yes, remove**.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.blockbrain.ai/for-admins/agents/ms-teams-agent.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
