A React demo application showing how to implement Microsoft Teams integration in your product using Novu's notification platform.
📚 For detailed setup instructions and Azure configuration, see the official Novu MS Teams documentation
This demo shows how to implement Microsoft Teams integration in your product. Your customers connect their Teams tenants and configure notification destinations. Novu sends notifications using your bot identity to Teams channels or users.
- ChannelConnection: Tenant-level Teams connection (created via admin consent)
- ChannelEndpoint: Specific notification destination:
ms_teams_channel: Send to Teams channelsms_teams_user: Send direct messages (DMs)
- Generating admin consent URLs using Novu's API
- Discovering Teams channels via Microsoft Graph API
- Discovering Teams users via Bot Framework roster API
- Creating channel and user endpoints
- Managing connections and endpoints
- Node.js 20+
- Novu account with API key
- Microsoft Azure AD app registration (multi-tenant) with Graph API permissions
- Azure Bot resource configured
- Teams app created and published
See the official documentation for detailed Azure setup instructions.
Create a .env.local file:
VITE_NOVU_API_KEY=your_novu_api_key
VITE_NOVU_API_URL=https://api.novu.co # or https://eu.api.novu.co for EU
VITE_INTEGRATION_IDENTIFIER=ms-teams-bot
VITE_AZURE_CLIENT_ID=your_azure_client_id
VITE_AZURE_CLIENT_SECRET=your_azure_client_secret
VITE_AZURE_TENANT_ID=your_azure_tenant_id
VITE_SUBSCRIBER_ID=your_subscriber_idSee .env.local.example for a template.
npm install
cp .env.local.example .env.local
# Edit .env.local with your credentials
npm run dev- Connect Teams: Click "Connect Teams" → Complete admin consent → Connection appears in list
- Create Channel Endpoint: Select team/channel (or enter IDs manually) → Create endpoint
- Create User Endpoint: Select team/user (or enter user ID manually) → Create endpoint
- Manage: View and delete connections/endpoints in the "Novu Integration State" section
- Novu API (
@novu/apiSDK): Generate OAuth URLs, manage connections/endpoints - Microsoft Graph API: Discover teams and channels
- Bot Framework API: Discover team members for DMs
src/api/- API clients (Novu, Graph, Bot Framework)src/components/- React components (ConnectTeams, TeamsChannelPicker, TeamsUserPicker, etc.)src/config.ts- Configuration helpers