Integrations

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

  1. In Azure Portal, create an Azure Bot resource
  2. 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.All
  • ChannelMessage.Read.All
  • ChannelMessage.Send
  • Team.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

  1. In Azure Portal, add Microsoft Teams channel to your bot
  2. Create a Teams app manifest or install via admin center
  3. 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

SettingBehavior
New threadTickets for new conversations only
Any messageAll messages create or update tickets
MentionOnly 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

  1. User posts in a subscribed Teams channel
  2. Bot Framework sends activity to Keva
  3. JWT token validated against Microsoft's JWKS
  4. Keva creates ticket with message content
  5. AI processes and drafts response
  6. 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

TypeHandling
messageCreates or updates tickets
conversationUpdateAcknowledged, no ticket
OtherReturns 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