How microsoft/embeddedteamschat works
Embedded Chat is a browser-embedded Teams chat experience, with an ASP.NET backend for mapping entity IDs to chat/meeting details and issuing ACS tokens or creating online meetings. The main flow is host-page embed → authentication → create or retrieve a chat mapping → load messages and participants → send messages and manage participants; Graph or ACS/GNB supplies notifications. The graph preserves the documented notification alternatives and major chat capabilities. Some links rely on README descriptions or the source index; unsampled implementation details are not inferred.
Main entry points: App.ts Chat app · ChatContainer.ts Chat interface · GraphService.cs Graph service · MappingRepository.cs Mapping repository
Components 26
Embed and auth
- Embed entry points
wwwroot/src/EmbedGraph.ts - Authentication
wwwroot/src/Utils/AuthUtil.ts - Auth flow
wwwroot/src/Auth.ts
Chat experience
- Chat app
wwwroot/src/Components/App.ts - Chat interface
wwwroot/src/Components/ChatContainer.ts - Participant picker
wwwroot/src/Components/AddParticipantDialog.ts - Graph operations
wwwroot/src/Utils/GraphUtil.ts - Chat and person data
wwwroot/src/Models/ChatMessage.ts - Client mapping
wwwroot/src/Models/Mapping.ts
Notifications
- Notification contract
wwwroot/src/NotificationClients/INotificationClient.ts - Graph notifications
wwwroot/src/NotificationClients/GraphNotificationClient.ts - ACS notifications
wwwroot/src/NotificationClients/AcsMeetingNotificationClient.ts
Backend services
- Mapping API
Controllers/MappingController.cs - Mapping repository
Repositories/MappingRepository.cs - ACS token API
Controllers/AcsTokenController.cs - ACS service
Services/AcsService.cs - Meeting API
Controllers/GraphController.cs - Graph service
Services/GraphService.cs - App settings
Models/AppSettings.cs - Thread details
Models/ThreadInfo.cs - Backend mapping
Models/Mapping.cs
Other components
- Host application
- Microsoft Graph
- Graph notification broker
- Azure Communication Services
- Azure Table Storage
Connections 24
- Host application → Embed entry points: embeds
README.md - Embed entry points → Chat app: renders
- Chat app → Authentication: requests tokens
wwwroot/src/Components/App.ts - Authentication → Auth flow: messages
wwwroot/src/Utils/AuthUtil.ts - Chat app → Chat interface: renders
wwwroot/src/Components/App.ts - Chat interface → Participant picker: opens picker
wwwroot/src/Components/ChatContainer.ts - Chat interface → Graph operations: performs operations
wwwroot/src/Components/ChatContainer.ts - Graph operations → Microsoft Graph: calls API
wwwroot/src/Utils/GraphUtil.ts - Chat interface → Chat and person data: uses data
wwwroot/src/Components/ChatContainer.ts - Chat app → Client mapping: uses mapping
wwwroot/src/Components/App.ts - Chat app → Notification contract: starts notifications
wwwroot/src/Components/App.ts - Graph notifications → Notification contract: implements
wwwroot/src/NotificationClients/GraphNotificationClient.ts - ACS notifications → Notification contract: implements
wwwroot/src/NotificationClients/AcsMeetingNotificationClient.ts - Graph notifications → Graph notification broker: subscribes
- ACS notifications → Azure Communication Services: uses notifications
- Mapping API → Mapping repository: reads and writes
Controllers/MappingController.cs - Mapping repository → Azure Table Storage: reads and writes
Repositories/MappingRepository.cs - Mapping repository → Backend mapping: converts
Repositories/MappingRepository.cs - ACS token API → ACS service: requests token
Controllers/AcsTokenController.cs - Meeting API → Graph service: creates meeting
Controllers/GraphController.cs - Graph service → Microsoft Graph: creates online meeting
Services/GraphService.cs - Graph service → Thread details: uses details
Services/GraphService.cs - Graph service → App settings: reads configuration
Services/GraphService.cs - Backend mapping → Thread details: contains details
Models/Mapping.cs