A Microsoft Teams AI Library bot that provides conversational access to Teams app catalog data across multiple audience groups (rings).
- π Natural Language Search: Search for Teams apps using conversational queries
- π― Audience Group Support: Access app data across different rings (R0, R1, R2, R3, R4/General)
- π Entitlement Analysis: Explore app entitlement states (PreConsented, Installed, Featured, etc.)
- π Comprehensive Data: Access store apps, core apps, pre-approved apps, and override configurations
- β‘ Smart Caching: Efficient URL-based caching with 70-80% request reduction
- π Background Loading: Automatic data refresh with minimal disruption
The bot implements the architecture specified in the Teams AI Bot specification:
- Catalog Configuration Manager - Fetches configs from Microsoft endpoints
- Data Loader Service - Loads app definitions and entitlements with caching
- Search & Query Engine - Processes natural language queries
- Conversation Handler - Formats responses for Teams chat
- Caching Layer - Efficient data storage and retrieval
- .NET 8.0 SDK
- Visual Studio 2022 or VS Code
- Microsoft Teams account for testing
- Bot Framework registration (for deployment)
-
Clone and Build
cd c:\src\catalogexpertagent dotnet restore dotnet build
-
Configure Bot Settings
Update
appsettings.Development.jsonwith your bot credentials:{ "MicrosoftAppId": "your-app-id-here", "MicrosoftAppPassword": "your-app-password-here", "MicrosoftAppTenantId": "your-tenant-id-here" } -
Run the Bot
dotnet run
The bot will start on
http://localhost:5000and begin loading catalog data in the background.
Use the Bot Framework Emulator to test locally:
- Download Bot Framework Emulator
- Connect to
http://localhost:5000/api/messages - Start chatting with the bot!
- "Find Microsoft apps"
- "Search for Teams"
- "Show me Outlook apps"
- "What apps are available in R1?"
- "Show me Ring0 apps"
- "Apps in general audience"
- "What apps are pre-consented?"
- "Show permanently installed apps"
- "Find featured apps"
- "Tell me about Microsoft Teams"
- "Details about app [GUID]"
- "Show me app information for Outlook"
- "Status" - Check data loading status
- "Help" - Show available commands
- "/reset" - Reset conversation
π **Found 15 apps matching "Microsoft":**
1. π± **Microsoft Teams** π’β‘
π’ Microsoft Corporation
π com.microsoft.teams
π― Available in: R4, R3, R2, R1
β
4 entitlements
π Collaborate with your team...
2. π± **Outlook**
π’ Microsoft Corporation
π com.microsoft.outlook
π― Available in: R4, R3, R1
β
2 entitlements
π± **Microsoft Teams** π’β‘
π’ **Developer:** Microsoft Corporation
π **App ID:** `com.microsoft.teams`
π― **Version:** 1.0.5
π **Description:** Collaborate with your team in channels and chat...
π **Audience Group Versions:**
β’ R4 (General): v1.0.5
β’ R3 (Ring3): v1.0.4
β’ R1 (Ring1): v1.0.3
π **Entitlement States:**
β’ R4 (General): π Permanent, β
Pre-consented
β’ R3 (Ring3): π Permanent
β’ R1 (Ring1): π’ Installed
RefreshIntervalHours: How often to refresh catalog data (default: 1 hour)CacheTimeoutHours: Cache timeout for configurations (default: 1 hour)MaxSearchResults: Maximum search results to return (default: 50)EnableBackgroundRefresh: Enable automatic background refresh (default: true)
The bot uses structured logging with different levels:
- Information: General operation logs
- Debug: Detailed operation logs (Development only)
- Warning: Non-critical issues (failed audience groups, etc.)
- Error: Critical errors requiring attention
The bot fetches data from Microsoft's official endpoints:
- Configuration:
https://config.edge.skype.com/config/v1/MicrosoftTeams/1.0.0.0?agents=MicrosoftTeamsAppCatalog - App Definitions: CDN URLs from configuration (store, core, pre-approved, override)
- Entitlements: Preconfigured entitlement URLs from configuration
general(R4) - General availabilityring0(R0) - Earliest preview ringring1(R1) - Preview ring 1ring1_5(R1.5) - Preview ring 1.5ring1_6(R1.6) - Preview ring 1.6ring2(R2) - Preview ring 2ring3(R3) - Preview ring 3ring3_6(R3.6) - Preview ring 3.6ring3_9(R3.9) - Preview ring 3.9
The bot implements several performance optimizations:
- URL Caching: Avoids duplicate HTTP requests (70-80% efficiency)
- Parallel Loading: Loads multiple sources simultaneously
- Memory Caching: Caches processed data in memory
- Background Processing: Loads data without blocking user interactions
- Request Deduplication: Shares responses across audience groups
- Initial Load: 30 seconds for full catalog
- Query Response: <3 seconds for search results
- Cache Hit Rate: >80% for repeated queries
- Memory Usage: Optimized data structures
- Create an Azure Bot Service resource
- Deploy the application to Azure App Service
- Configure the messaging endpoint:
https://your-app.azurewebsites.net/api/messages - Set environment variables for bot credentials
Create a Teams app package with the following manifest:
{
"manifestVersion": "1.16",
"version": "1.0.0",
"id": "your-app-id",
"packageName": "com.your-company.catalogexpert",
"developer": {
"name": "Your Company",
"websiteUrl": "https://your-website.com",
"privacyUrl": "https://your-website.com/privacy",
"termsOfUseUrl": "https://your-website.com/terms"
},
"name": {
"short": "Catalog Expert",
"full": "Teams App Catalog Expert Bot"
},
"description": {
"short": "Explore Teams app catalog",
"full": "Conversational bot for exploring Microsoft Teams app catalog across audience groups"
},
"icons": {
"outline": "outline.png",
"color": "color.png"
},
"accentColor": "#0078D4",
"bots": [
{
"botId": "your-bot-id",
"scopes": ["personal", "team", "groupchat"],
"isNotificationOnly": false
}
],
"permissions": ["identity", "messageTeamMembers"],
"validDomains": ["your-domain.azurewebsites.net"]
}Check bot health at: GET /health
Response:
{
"Status": "Healthy",
"LastLoadTime": "2025-06-20T10:30:00Z",
"AppCount": 1250,
"EntitlementCount": 890,
"CacheEfficiency": 78.5
}Monitor these key metrics:
- Data load success rate
- Query response times
- Cache hit rates
- Error rates by audience group
- Most common search terms
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For issues and questions:
- Check the logs for detailed error information
- Verify bot credentials and configuration
- Test with Bot Framework Emulator
- Review the specification document for expected behavior
Built with Teams AI Library - Implementing the CatalogExpert specification for conversational Teams app discovery.