> For the complete documentation index, see [llms.txt](https://docs.firefly.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.firefly.ai/integrations/data-sources/microsoft-teams.md).

# Microsoft Teams

Firefly integrates with Microsoft Teams to pull your tenant's Teams admin configuration—meeting policies and tenant-wide meeting, client, and external access settings—directly into your Firefly Inventory. This gives you a unified view of your collaboration platform's configuration alongside the rest of your cloud infrastructure, so you can govern how Teams is set up across your organization.

> This integration is a **data source**: Firefly reads configuration from your Teams tenant. To send Firefly notifications *to* a Teams channel, see the [Microsoft Teams notification integration](https://docs.firefly.ai/integrations/notifications/microsoft-teams.md) instead. The two are configured separately.

## Prerequisites

* A Microsoft 365 tenant with Microsoft Teams.
* Permission to register an application in Microsoft Entra ID.
* Permission to assign the **Teams Administrator** role in the Microsoft 365 admin center. This typically requires a Global Administrator or Privileged Role Administrator.

## Setup Procedure

### 1. Register an Application in Entra ID

1. In the Azure Portal, go to [App registrations](https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade).
2. Click **New registration**.
3. Enter a name for the application (for example, `Firefly Teams`).
4. Leave the default settings and click **Register**.
5. On the application's **Overview** page, copy the following values:
   * **Application (client) ID**
   * **Directory (tenant) ID**

### 2. Create a Client Secret

The secret value is shown only once, so it is best generated immediately before you paste it into Firefly.

1. In the application, go to **Manage > Certificates & secrets**.
2. Click **New client secret**.
3. Set an expiry period and click **Add**.
4. Copy the secret **Value** immediately—it is not shown again.

> Copy the secret **Value**, not the Secret ID. These are different, and the Secret ID will not authenticate.

Make a note of the expiry date you set. When a client secret expires, Firefly can no longer scan your tenant—see [Rotating the Client Secret](#rotating-the-client-secret).

### 3. Assign the Teams Administrator Role

Firefly reads Teams configuration through the Microsoft Teams admin APIs, which authorize by directory role rather than by Microsoft Graph application permissions. Granting Graph permissions to the app is not enough on its own.

1. In the [Microsoft 365 admin center](https://admin.microsoft.com/), go to **Roles > Role assignments**.
2. Open the **Teams Administrator** role.
3. Assign the role to the service principal of the application you registered in step 1.

If you do not hold a role that can assign Teams Administrator, ask someone who does to complete this step before continuing.

> Firefly validates the Tenant ID, Client ID, and Client Secret when you save the integration, but it cannot verify the role assignment at that point. If the role is missing, the integration saves successfully and then fails on its first scan—see [Troubleshooting](#troubleshooting).

### 4. Configure in Firefly

1. In Firefly, go to **Settings > Integrations**.
2. Click **Add New > Microsoft Teams** (the data source tile, not the notification tile).
3. Enter a **Nickname** to customize how this integration appears in Firefly. The default is `Microsoft Teams`.
4. Enter your **Tenant ID** (the Directory (tenant) ID from step 1).
5. Enter your **Client ID** (the Application (client) ID from step 1).
6. Paste your **Client Secret** (the secret Value from step 2).
7. Click **Next**.
8. Click **Done**.

On save, Firefly authenticates against your tenant and displays an error if the Tenant ID is not found or the credentials are rejected. Once validated, Firefly queues an initial scan of your tenant. Resources can take up to one hour to appear in the Inventory.

## Supported Assets

Firefly supports 4 Microsoft Teams asset types.

### Tenant Configuration

These are tenant-wide settings. Each exists exactly once per tenant and appears in the Inventory with the identity `Global`.

| Asset Type                    | Identifier                            |
| ----------------------------- | ------------------------------------- |
| Meeting Configuration         | `teams_meeting_configuration`         |
| Client Configuration          | `teams_client_configuration`          |
| External Access Configuration | `teams_external_access_configuration` |

### Policies

| Asset Type       | Identifier             |
| ---------------- | ---------------------- |
| Meeting Policies | `teams_meeting_policy` |

Firefly indexes every meeting policy defined in the tenant, including the built-in `Global` policy and any custom policies you have created.

> Asset type identifiers use the `teams_` prefix, matching the naming used by the underlying `terraprovider/teams` Terraform provider.

## Discovered Assets

Microsoft Teams assets appear in your Inventory with the **Discovered** status.

Discovered means Firefly has found the asset in your tenant and indexed it, but has not evaluated it against Infrastructure-as-Code. It sits alongside the other inventory states—Managed, Unmanaged, Drifted, and Ghost.

Because Discovered assets are not evaluated against IaC, the following information is hidden for them:

* Drift status
* IaC type
* VCS repository and stack
* IaC coverage and tagging coverage in Inventory summaries

> Missing drift, IaC, and VCS information on Microsoft Teams assets is expected behavior, not a data problem.

Discovered does not restrict what you can do with the asset. Microsoft Teams assets support codification—see [Codification](#codification).

## Codification

Firefly supports codification for Microsoft Teams assets, using the same flow as any other provider. Select the asset in your Inventory and choose **Codify** to generate Terraform for it.

Generated code targets the [`terraprovider/teams`](https://registry.terraform.io/providers/terraprovider/teams/latest) Terraform provider.

Learn more in [Codification](https://docs.firefly.ai/detailed-guides/codification.md).

## Applications

Microsoft Teams assets can be added to Applications, so Teams configuration is grouped and protected together with the infrastructure it supports.

1. In the Inventory, filter to your Microsoft Teams assets and select the ones you want to add.
2. Click **Application**, then choose one of:
   * **New Application** — create a new application from the selected assets.
   * **Assign to Existing** — add the selected assets to an application you already have.

Creating a new application walks through four steps:

| Step                  | What you do                                                                                                                                                                                                                                         |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Application Scope** | Name the application, select **Microsoft Teams** as the platform it runs on, and choose the Microsoft Teams **Account**—your integration. Optionally narrow the scope by asset type. The assets you selected appear under **Added from Inventory**. |
| **Discovery**         | Review the resources Firefly found for the application, grouped by asset type.                                                                                                                                                                      |
| **Resilience**        | Enable **Protect this application**, then set the protection level and the recovery time objective (RTO).                                                                                                                                           |
| **Completion**        | Review the summary and click **Create**.                                                                                                                                                                                                            |

For Microsoft Teams, **Configuration Backup** is the only available protection level—scheduled snapshots of the application's configuration for point-in-time restore. **Recovery Automation**, which rebuilds an application into a target account, is not available for Microsoft Teams, and the wizard says so when you reach the Resilience step.

Microsoft Teams assets are also supported by **Group by** in the Inventory.

Learn more in [Applications Backup & DR](https://docs.firefly.ai/key-features/backup-and-dr.md).

## Built-in Governance Policies

Firefly includes built-in [governance policies](https://docs.firefly.ai/detailed-guides/policy-and-governance.md) for Microsoft Teams. There is nothing to set up — they run automatically on the Teams assets Firefly has ingested, so risky settings appear next to the rest of your cloud posture. The checks cover:

* **External access:** channels shared outside the company, files auto-shared in external chats, and anonymous meeting join.
* **Apps and storage:** unrestricted third-party and custom apps, custom app uploads, and third-party storage such as Box and Google Drive.
* **Threat protection:** malicious link and file detection turned off, and users unable to report suspicious messages.

Policies are mapped to **SOC 2**, **PCI DSS** and **CIS** where they apply, including CIS Microsoft 365 controls 8.1.1, 8.1.2, 8.4.1 and 8.6.1.

> **Note:** These policies flag risks against a subset of the CIS Microsoft 365 benchmark's Teams controls; they are not full benchmark coverage, and a flagged setting may be a deliberate choice rather than a misconfiguration.

## Configuration Details

* Firefly scans your Teams tenant on a scheduled interval, and your inventory stays updated automatically.
* Firefly reads configuration through the Microsoft Teams admin APIs, not Microsoft Graph. This is the same backend used by the Microsoft Teams PowerShell module.
* Only one integration per Teams tenant is supported for each Firefly account. Connecting the same tenant twice is rejected.
* Creating, editing, and deleting the integration requires an Admin role in Firefly. Viewing it requires Read access.
* Credentials are encrypted at rest.

## Managing the Integration

To manage an existing integration, go to **Settings > Integrations > Microsoft Teams** and open the integration menu:

* **Edit** — update the integration's credentials or name in place, without disconnecting the tenant. Fields that already hold a value cannot be cleared; leave a field unchanged to keep its stored value.
* **Delete** — remove the integration. Its assets are removed from your Inventory.

## Scanning On Demand

To scan your integration for changes and discover new assets on demand:

1. Go to **Settings > Integrations > Microsoft Teams**.
2. Find the integration you want to scan.
3. On the integration menu, select **Scan Assets**.
4. View changes in the Inventory after several minutes.

## Rotating the Client Secret

Client secrets in Entra ID expire based on the expiry period set when they were created. When a secret expires, Firefly can no longer authenticate and scans will begin to fail.

To move to a new secret:

1. In the Azure Portal, open the same app registration and go to **Manage > Certificates & secrets**.
2. Click **New client secret**, set an expiry, and click **Add**.
3. Copy the new secret **Value**.
4. In Firefly, go to **Settings > Integrations > Microsoft Teams**.
5. On the integration menu, select **Edit**.
6. Paste the new secret and click **Save**.

Firefly re-validates the credentials on save, then queues a fresh scan of your tenant.

If you change the **Tenant ID** while editing, Firefly treats the integration as pointing at a new tenant: assets from the previous tenant are removed from your Inventory and the new tenant is scanned. The stored Client ID and Client Secret are not reused across tenants, so supply credentials for the new tenant at the same time.

> Set a reminder ahead of your client secret's expiry date. Firefly cannot scan your tenant with an expired secret.

## Limitations

* **No drift detection** for Microsoft Teams assets. They are indexed for visibility and governance but are not evaluated against IaC.
* **No automated recovery** for Microsoft Teams applications. Configuration Backup is available; Recovery Automation is not—see [Applications](#applications).
* **One tenant per integration.** Connect additional tenants as separate integrations.
* **Initial asset coverage.** The current release covers the four asset types listed under [Supported Assets](#supported-assets). Additional Teams policies and tenant configurations will be added over time.

## Troubleshooting

| Symptom                                                                | Resolution                                                                                                                                                                                                                           |
| ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| "That Tenant ID was not found in Microsoft Entra ID"                   | Confirm you entered the *Directory (tenant) ID* from the app's Overview page, with no surrounding URL or path characters.                                                                                                            |
| "Failed to authenticate with Microsoft Teams"                          | Confirm you pasted the secret **Value** and not the Secret ID. Confirm the Client ID is the *Application (client) ID* and the Tenant ID is the *Directory (tenant) ID*—these are easy to transpose.                                  |
| "This Microsoft Teams tenant is already connected"                     | A Microsoft Teams integration already exists for that tenant in this Firefly account. Check your existing integrations.                                                                                                              |
| Integration saved successfully but shows an error after the first scan | The app's service principal does not hold the **Teams Administrator** role. Firefly cannot check the role at save time, so a missing role surfaces as a permission error on the first scan. Assign the role and run **Scan Assets**. |
| Integration worked previously and is now failing                       | The client secret has most likely expired. See [Rotating the Client Secret](#rotating-the-client-secret).                                                                                                                            |
| Connected successfully but no assets appear                            | Allow up to one hour for the first scan to complete, then confirm the Teams Administrator role is assigned to the app's service principal.                                                                                           |
| Drift, IaC, or VCS information is missing                              | Expected behavior—see [Discovered Assets](#discovered-assets).                                                                                                                                                                       |

## Additional Resources

* [Microsoft Teams admin documentation](https://learn.microsoft.com/en-us/microsoftteams/) — Official Microsoft documentation
* [Register an application with Microsoft Entra ID](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app) — Microsoft app registration guide
* [Assign admin roles in the Microsoft 365 admin center](https://learn.microsoft.com/en-us/microsoft-365/admin/add-users/assign-admin-roles) — Microsoft role assignment guide
* [Cloud Asset Inventory](https://docs.firefly.ai/key-features/cloud-asset-inventory.md) — How Firefly classifies and displays discovered assets


---

# 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.firefly.ai/integrations/data-sources/microsoft-teams.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.
