A Microsoft Teams application that enables natural language queries to Fabric Data Agents, featuring real-time streaming responses, DAX query visualization, and multi-agent support.
- Natural Language Queries: Ask questions in plain language and get AI-powered answers from your semantic models
- Multi-Agent Support: Connect to multiple Fabric Data Agents and switch between them seamlessly
- Real-Time Streaming: See responses as they're generated with live progress indicators
- Query Transparency: View the generated DAX code and query results for each analysis step
- Teams Integration: Native Teams app experience with SSO authentication
- Fluent UI Design: Modern, responsive interface following Microsoft design guidelines
┌─────────────────────────────────────────────────────────────────┐
│ Teams / Browser │
├─────────────────────────────────────────────────────────────────┤
│ React App (Vite) │
│ ├── MSAL Authentication (Azure AD) │
│ ├── Fluent UI Components │
│ └── Streaming SSE Handler │
├─────────────────────────────────────────────────────────────────┤
│ Fabric REST API │
│ ├── /workspaces - List available workspaces │
│ ├── /dataAgents - Discover Data Agents │
│ └── /aiassistant/openai - Query endpoint (streaming) │
└─────────────────────────────────────────────────────────────────┘
- Node.js 18+
- Azure AD App Registration with appropriate permissions
- Access to Microsoft Fabric with Data Agent(s) configured
- Go to Azure Portal > Azure Active Directory > App registrations
- Click New registration:
- Name:
Data Agent Client - Supported account types:
Accounts in this organizational directory only - Redirect URI: Select
Single-page application (SPA)>http://localhost:3000
- Name:
- Copy the Application (client) ID
In your App Registration:
- Go to API permissions > Add a permission
- Select APIs my organization uses > Search for
Power BI Service - Add Delegated permissions:
Dataset.Read.AllWorkspace.Read.All
- Click Grant admin consent (requires admin privileges)
Edit src/authConfig.js with your Client ID:
clientId: "YOUR_CLIENT_ID_HERE",npm install
npm run dev# Install Teams Toolkit CLI
npm install -g @microsoft/teamsapp-cli
# Login to Azure and Microsoft 365
teamsapp auth login azure
teamsapp auth login m365
# Provision cloud resources
teamsapp provision --env dev
# Deploy the application
teamsapp deploy --env dev
# Publish to Teams
teamsapp publish --env devDeploy the production build to Azure Static Web Apps, Vercel, or similar:
npm run build
# Upload the 'dist' folder to your hosting serviceEdit appPackage/manifest.json and replace placeholders:
| Placeholder | Description |
|---|---|
{{APP_ID}} |
A unique GUID for your Teams app |
{{APP_DOMAIN}} |
Your hosting domain (e.g., your-app.azurestaticapps.net) |
{{AAD_APP_ID}} |
Your Azure AD Application (client) ID |
az ad app update --id YOUR_CLIENT_ID \
--identifier-uris "api://YOUR_CLIENT_ID"Create the following icons in appPackage/:
color.png: 192x192 px (full color)outline.png: 32x32 px (transparent background, single color)
cd appPackage
zip -r ../dataagent-client.zip manifest.json color.png outline.pngFor personal use:
- Open Teams > Apps > Manage your apps
- Click Upload an app > Upload a custom app
- Select
dataagent-client.zip
For organization-wide deployment:
- Go to Teams Admin Center
- Navigate to Teams apps > Manage apps
- Click Upload new app > Select
dataagent-client.zip - Approve and publish
├── src/
│ ├── main.jsx # Entry point with MSAL provider
│ ├── App.jsx # Main chat component with streaming
│ └── authConfig.js # MSAL configuration & endpoints
├── appPackage/
│ └── manifest.json # Teams app manifest
├── index.html # HTML entry point
├── package.json # Dependencies and scripts
└── vite.config.js # Vite build configuration
Ensure your Azure AD app registration has the correct redirect URI:
- For local development:
http://localhost:3000 - For production: Your deployed app URL
- Verify you have access to at least one Fabric workspace with a Data Agent
- Check that the Data Agent is properly configured in Fabric
- Ensure your Azure AD app has the required permissions
- Clear browser cache and cookies
- Try using incognito/private browsing
- Check browser console for detailed error messages
- Verify network connectivity to
api.fabric.microsoft.com - Check browser DevTools Network tab for failed requests
- Ensure the Data Agent endpoint is accessible
- Authentication: MSAL acquires token with Fabric scopes
- Discovery: App fetches available workspaces and Data Agents
- Query Flow:
- Create Assistant instance
- Create conversation Thread
- Post user Message
- Create Run with
stream: true - Parse SSE events for real-time updates
- Cleanup Thread on completion
- React 18 - UI framework
- Vite 5 - Build tool and dev server
- MSAL React - Azure AD authentication
- Fluent UI React - Microsoft design system components
- Teams JS SDK - Teams integration
MIT