Microsoft Teams Integration
Handle support requests from Microsoft Teams channels
Connect Microsoft Teams to receive support requests and respond directly in conversations.
Prerequisites
- Microsoft 365 tenant with Teams
- Azure account for bot registration
- Admin consent for required permissions
Setup
1. Create an Azure Bot
- In Azure Portal, create an Azure Bot resource
- Set messaging endpoint:
https://app.keva.support/api/webhooks/teams
2. Configure Permissions
In Azure AD App registration, add these Graph API permissions:
Channel.ReadBasic.AllChannelMessage.Read.AllChannelMessage.SendTeam.ReadBasic.All
Grant admin consent for your organization.
3. Get Credentials
From your Azure AD app registration:
- Application (client) ID
- Client secret (create under Certificates & Secrets)
- Tenant ID
4. Connect to Keva
Go to Settings > Integrations > Teams and enter your credentials.
5. Install Bot in Teams
- In Azure Portal, add Microsoft Teams channel to your bot
- Create a Teams app manifest or install via admin center
- Add the bot to your target teams/channels
6. Subscribe to Channels
Go to Settings > Channels, click Add Teams Channel, and select channels to monitor.
Configuration Options
Create Ticket On
| Setting | Behavior |
|---|---|
| New thread | Tickets for new conversations only |
| Any message | All messages create or update tickets |
| Mention | Only when bot is @mentioned (recommended for busy channels) |
Routing
- Workspace: Route to a specific workspace
- Default Priority: Set initial priority
- Auto-assign: Assign to AI or specific agent
How It Works
- User posts in a subscribed Teams channel
- Bot Framework sends activity to Keva
- JWT token validated against Microsoft's JWKS
- Keva creates ticket with message content
- AI processes and drafts response
- Reply posts back to the Teams conversation
Bot Framework Authentication
Teams uses JWT authentication:
- Token validated against Microsoft's OpenID configuration
- Issuer must be
https://api.botframework.com - Audience must match your Microsoft App ID
- JWKS cached for 1 hour
Activity Types
| Type | Handling |
|---|---|
message | Creates or updates tickets |
conversationUpdate | Acknowledged, no ticket |
| Other | Returns 200 OK |
Troubleshooting
Webhook not receiving messages: Verify endpoint URL, check bot is added to channel, confirm permissions are granted.
JWT validation failing: Check App ID matches, verify bot registration is active, ensure token is not expired.
Bot not responding: Verify Teams channel is enabled in Azure, check bot is installed in team, confirm ticket was created.
Permission denied: Grant admin consent, verify all Graph permissions, check app is in correct tenant.
Security
- JWT tokens validated against Microsoft's JWKS
- Service URL claim verified to prevent spoofing
- App secrets encrypted at rest
- All activities logged in audit trail