---
title: Microsoft Teams
description: Send SAP document notifications and files to Microsoft Teams channels. Supports Incoming Webhooks and Microsoft Graph API modes.
type: teams
use_cases:
  - Finance team notifications for new SAP documents
  - Document upload to Teams channel file tabs
  - Failure alerts and operational monitoring
config_fields:
  - name: webhook_url
    type: string
    required: false
    desc: "Incoming Webhook URL (for webhook mode; use this OR team_id + channel_id)"
  - name: team_id
    type: string
    required: false
    desc: "Teams team ID (for Graph API mode; use with channel_id)"
  - name: channel_id
    type: string
    required: false
    desc: "Teams channel ID (for Graph API mode; use with team_id)"
  - name: message
    type: string
    required: false
    desc: "Custom message text (supports placeholders)"
credential_fields:
  - name: client_id
    type: string
    required: false
    desc: "Azure AD App Client ID (required for Graph API mode)"
  - name: client_secret
    type: string
    required: false
    desc: "Azure AD Client Secret (required for Graph API mode)"
  - name: tenant_id
    type: string
    required: false
    desc: "Azure AD Tenant ID (required for Graph API mode)"
---

Two modes: **Incoming Webhooks** for simple notification cards, **Microsoft Graph API** for full document upload + channel messaging.

## Pick a mode

| Feature | Webhook | Graph API |
|---|:---:|:---:|
| Message notifications | ✓ | ✓ |
| File uploads to channel | | ✓ |
| Adaptive Card formatting | ✓ | ✓ |
| Setup complexity | URL only | Azure AD app |
| Credentials | None | Azure AD client creds |

Webhook for lightweight alerts (deliver the actual file to S3 / SharePoint and use Teams as the notification channel). Graph API when you want the file uploaded directly to the channel's Files tab.

## Webhook setup

1. In Teams, open the target channel → **⋯** → **Manage channel**.
2. Under **Connectors** (or **Workflows** in newer Teams), find **Incoming Webhook** → **Configure**.
3. Name it (e.g. "FileRelay"), optionally upload an icon → **Create** → copy the URL.
4. In FileRelay, add a **Microsoft Teams** destination → paste into `webhook_url`.

> **REPLACE:** Screenshot of the Teams webhook configuration in FileRelay

> **Note** — Microsoft is migrating from Office 365 Connectors to Workflows-based webhooks. If Incoming Webhooks aren't available, create a Power Automate **Workflow** with the "When a Teams webhook request is received" trigger and use the generated URL.

## Graph API setup

1. [Azure Portal](https://portal.azure.com) → **Azure AD → App registrations → New registration** (e.g. "FileRelay Teams").
2. **API permissions** → add Microsoft Graph **application** permissions:
   - `ChannelMessage.Send`
   - `Files.ReadWrite.All`
3. **Grant admin consent**.
4. **Certificates & secrets** → new client secret. Note the client ID, tenant ID, and secret value.
5. Find the team and channel IDs (see below).
6. In FileRelay, add a **Microsoft Teams** destination with all four IDs + the secret.

> **REPLACE:** Screenshot of the Graph API configuration in FileRelay

## How each mode delivers

**Webhook** — POSTs an Adaptive Card to the URL containing file name, document type, SAP doc ID, repository name, timestamp. The file itself is **not** uploaded.

**Graph API** — auths to Azure AD with client credentials, uploads the document to the channel's **Files** tab (backed by SharePoint), posts a channel message with a link to the file.

## Message placeholders

`message` supports:

| Placeholder | Description | Example |
|---|---|---|
| `{doc_id}` | SAP document ID | `4500012345` |
| `{doc_type}` | Document type | `Invoice` |
| `{repo_name}` | Repository name | `Vendor Invoices` |
| `{fileName}` | Filename | `4500012345.pdf` |
| `{date}` | Current date (YYYY-MM-DD) | `2026-04-04` |

Webhook mode puts the message in the Adaptive Card body; Graph API posts it as a channel message alongside the file link.

## Finding team + channel IDs

**Graph Explorer:**

```
GET https://graph.microsoft.com/v1.0/me/joinedTeams
GET https://graph.microsoft.com/v1.0/teams/{team_id}/channels
```

**Teams app:** right-click the channel name → **Get link to channel**. URL contains both:

```
https://teams.microsoft.com/l/channel/{channel_id}/...?groupId={team_id}&...
```

URL-decode `channel_id` from the path segment.

## Tips

- **Private channels** — both modes work. Webhooks must be configured inside the private channel; Graph API needs the app explicitly authorised for it.
- **Adaptive Cards** — webhook mode renders rich cards with structured fields automatically.
- **Rate limits** — Graph API throttles per app per tenant. FileRelay handles 429s with backoff.
- **Multiple channels** — one destination per channel; attach as many to a routing rule as you need.
- **Files tab storage** — Graph API uploads go to the channel's SharePoint library, so files are searchable, versioned, and reachable from SharePoint too.
- **Treat webhook URLs as secrets** — anyone with the URL can post. Compromised → delete the webhook in Teams, create a new one.
