Skip to main content

Microsoft Teams

Tasks

Route policy denial alerts, budget warnings, and human-in-the-loop approval requests to Microsoft Teams channels via incoming webhooks.

Prerequisites​

  • A Microsoft Teams channel where you can add a connector
  • AIControls admin access
Self-hosted Kubernetes

Card links back to AIControls (Approvals page, Cost dashboard) are built from ui.publicURL. If that Helm value isn't set, or names this machine (such as localhost or 127.0.0.1), AIControls leaves these links out until you set it — see ui.publicURL in the self-hosted setup guide.

Configure the integration​

  1. In Microsoft Teams, open the target channel, click ··· → Connectors → Incoming Webhook. Configure the webhook and copy the URL.
  2. In AIControls, go to Settings → Integrations → Microsoft Teams and click Add integration.
  3. Paste the webhook URL and give the integration a name.
  4. Select which event types should be delivered to this channel.
  5. Click Save. AIControls sends a test card immediately — confirm it appears in the Teams channel.

Which events fire​

EventBehaviour
Policy denialTool Call Denied card with the agent, tool, policy, policy rule (when the policy names one), and denial reason. A block on the response shows as a Response Blocked card instead.
Budget alert (80%)Card with current spend, cap, and a link to the Cost dashboard
Budget exceededCard with blocked status and instructions to raise the cap
HITL pendingApproval Required card with the agent, tool, policy, policy rule (when the policy names one), and approval ID (when the request has one), plus a Review request button when the request has a link to AIControls
note

Teams incoming webhooks don't support buttons that approve or deny inside Teams; they support only buttons that open a link. When a HITL approval request has a link to AIControls, the card includes a Review request button that opens the Approvals page, where the approver can act. The button appears only when the link is an absolute http or https URL, so set ui.publicURL on self-hosted installs. Cards without a link still show the approval details.

Troubleshooting​

Test card not appearing​

Confirm the connector is still active in Teams — connectors can be removed by channel owners or auto-disabled after inactivity. Recreate the incoming webhook and update the URL in AIControls if needed.

Cards appearing without formatting​

AIControls sends Office 365 connector message cards (MessageCard), not Adaptive Cards. If cards appear as raw JSON or plain text, confirm the URL is a Teams incoming webhook and that your Teams administrator allows connector cards in the channel.