Microsoft Teams Integration Setup
Connect Beever Atlas to Microsoft Teams to automatically ingest conversations and build a searchable knowledge base.
Beta Status: Teams integration is in beta. Features may change as we improve the integration. Requires Azure AD admin access.
Prerequisites
Before setting up Teams integration, ensure you have:
- Beever Atlas installed and running (see Installation)
- Azure AD admin access
- Ability to register applications in Azure Portal
- Teams admin permissions (optional, for bot installation)
Overview
The Teams integration uses Microsoft Graph API to:
- Ingest Messages: Fetch historical and new messages from channels
- Extract Attachments: Process files and images shared in Teams
- Build Knowledge Graph: Extract entities and relationships
Step 1: Register Application in Azure Portal
1.1 Go to Azure Portal
Navigate to portal.azure.com and sign in with your Microsoft account.
1.2 Register New App
- Search for App registrations in the search bar
- Click New registration
- Enter:
- Name:
Beever Atlas - Supported account types: Select appropriate type:
- Single tenant (for your organization only)
- Multi-tenant (for multiple organizations)
- Redirect URI: Leave blank for now
- Name:
- Click Register
Step 2: Configure API Permissions
2.1 Add Microsoft Graph Permissions
In the application overview:
- Click API permissions in the left sidebar
- Click Add a permission
- Select Microsoft Graph
- Select Application permissions (for background sync):
Add the following permissions:
| Permission | Purpose |
|---|---|
ChannelMessage.Read.All | Read all channel messages |
Chat.Read | Read chat messages |
User.Read.All | Read user information |
Files.Read.All | Access file attachments |
Application vs Delegated: We use Application permissions for background sync (no user interaction required). This requires admin consent.
2.2 Grant Admin Consent
- After adding permissions, click Grant admin consent for your organization
- Confirm the consent dialog
- Wait for consent to be granted (status shows ✓)
Step 3: Create Client Secret
3.1 Generate Secret
In the application configuration:
- Click Certificates & secrets in the left sidebar
- Under Client secrets, click New client secret
- Enter:
- Description:
Beever Atlas Secret - Expires: Select expiration period (recommended: 180 days)
- Description:
- Click Add
3.2 Copy Secret Value
Copy the Value (not the Secret ID):
Critical: Copy the secret value immediately — you won't be able to see it again. Store it securely.
Step 4: Get Application Credentials
From the application overview, copy:
- Application (client) ID — Your app's unique identifier
- Directory (tenant) ID — Your Azure AD tenant ID
- Client secret value — From Step 3.2
Step 5: Configure Beever Atlas
5.1 Disable Mock Mode
Edit your .env file:
ADAPTER_MOCK=false5.2 Add Teams Credentials
Add the following to your .env:
# Microsoft Teams / Graph API
TEAMS_TENANT_ID=your_tenant_id_here
TEAMS_CLIENT_ID=your_client_id_here
TEAMS_CLIENT_SECRET=your_client_secret_hereAlternative: Add credentials through the web UI (Settings → Connections) for encrypted storage.
Step 6: Restart Services
After configuring Teams integration, restart the services:
docker compose restart beever-atlasStep 7: Sync Your Teams
7.1 List Available Teams/Channels
After restart, Atlas will attempt to fetch available teams and channels. You can view them in the dashboard:
- Navigate to Channels
- See the list of Teams and channels
- Only channels where the service principal has access will appear
7.2 Trigger a Sync
Via Dashboard:
- Go to Channels
- Find the Teams channel you want to sync
- Click Sync
- Monitor progress in the Sync Status column
Via API:
# Trigger sync for a channel
curl -X POST http://localhost:8000/api/channels/19:abc123@thread.tacv2/sync
# Check sync status
curl http://localhost:8000/api/channels/19:abc123@thread.tacv2/sync/statusChannel IDs: Teams channel IDs are long strings like 19:abc123@thread.tacv2. These are automatically discovered by Atlas.
Troubleshooting
"Invalid Client Secret" Error
Check that:
- Client secret is correct (no extra spaces or newlines)
- Secret hasn't expired
- You copied the Value, not the Secret ID
"Insufficient Privileges" Error
The application lacks required permissions:
- Verify all required permissions are added
- Ensure admin consent was granted
- Check that permissions are Application permissions, not Delegated
No Teams/Channels Appearing
Verify:
- Service principal is a member of the Team
- Application has correct Graph API permissions
- Admin consent was granted for all permissions
- Tenant ID is correct
Add service principal to a Team:
- Go to Teams admin center
- Navigate to Manage teams
- Select the team
- Click Members → Add member
- Search for your application name
- Add as a member
Rate Limiting
Microsoft Graph API has rate limits:
- Large organizations may experience rate limiting
- Atlas automatically handles rate limits with exponential backoff
- Consider syncing fewer channels for very large teams
Authentication Errors
Common authentication issues:
- Expired secret: Regenerate client secret and update
.env - Wrong tenant ID: Verify you're using the correct tenant
- App registration disabled: Check app status in Azure Portal
Best Practices
Application Security
- Use client secrets with appropriate expiration
- Rotate secrets regularly
- Use Azure Key Vault for secret management in production
- Monitor app usage in Azure Portal
Permission Model
- Grant minimum required permissions
- Use security groups for access control
- Regularly audit app permissions
- Consider creating separate apps for different environments
Sync Strategy
- Start with key knowledge-sharing teams
- Use
SYNC_MAX_MESSAGESto control initial sync size - Schedule syncs during off-hours for large teams
Privacy Considerations
- Teams may contain sensitive organizational information
- Review channel permissions before syncing
- Consider separate Atlas instances for different departments
- Enable channel-level ACL for access control
Limitations
Current limitations of Teams integration:
- 1:1 Chats: Limited support for private chats
- Channel Meetings: No meeting transcription support
- Large Files: File attachment size limits apply
- Guest Access: May have limitations with guest users
Advanced Configuration
Service Principal Authentication
For production deployments, consider using certificate-based authentication instead of client secrets:
- Upload a certificate to the app registration
- Configure Atlas to use the certificate
- More secure but requires additional setup
Multi-Tenant Support
If you selected Multi-tenant during registration:
- Each organization must separately install the app
- Requires admin consent from each tenant
- Configure Atlas with multiple credential sets
Custom Graph API Endpoints
For custom deployments (e.g., sovereign clouds):
GRAPH_API_BASE_URL=https://graph.microsoft.com # Default
# For government clouds:
# GRAPH_API_BASE_URL=https://graph.microsoft.usWhat's Next?
- How It Works — Learn about the ingestion pipeline
- Slack Setup — Connect multiple platforms
- Deployment — Production setup guide
Connected successfully? Try asking questions about your Teams conversations in the Q&A interface!