Blog Post

Analytics on Azure Blog
3 MIN READ

Supercharge Data Intelligence: Build Teams App with Azure Databricks Genie & Azure AI Agent Service

GISV-PSA-MSFT's avatar
GISV-PSA-MSFT
Icon for Microsoft rankMicrosoft
Aug 12, 2025

Introduction

Are you looking to unlock the full potential of your data investments in Azure Databricks while seamlessly harnessing the capabilities of Azure AI? At Microsoft BUILD 2025, we made the announcement of the Azure Databricks connector in Azure AI Foundry. This blog post is a follow-up to take advantage of this feature within Microsoft Teams.

We'll guide you through leveraging the integration between Azure Databricks and Azure AI Foundry to build a Python-based Teams app that consumes Genie APIs using the secure On-Behalf-Of (OBO) authentication flow.

Whether you are a data engineer, AI developer, or a business user seeking actionable insights, this guide will help you accelerate your journey in data intelligence with modern, secure, and streamlined tools.

You can find the code samples here: AI-Foundry-Connections - Teams chat with Azure Databricks Genie | GitHub  (git clone https://github.com/Azure-Samples/AI-Foundry-Connections.git )

Setting the Stage: Key Components

Before we dive into the sample app, let’s quickly establish what each major component brings to the table.

What is AI/BI Genie?

AI/BI Genie is an intelligent agent feature in Azure Databricks, exposing natural language APIs to interact with your data. It empowers users to query, analyze, and visualize data using conversational AI, making advanced analytics accessible to everyone.

Azure AI Foundry

Azure AI Foundry is your control center for building, managing, and deploying AI solutions. It offers a unified platform to orchestrate AI agents, connect to various data sources like Azure Databricks, and manage models, workflows, and governance.

Azure AI Agent Service

Azure AI Agents are modular, reusable, and secure components that interact with data and AI services. They enable you to build multi-agent workflows, integrate with enterprise systems, and deliver contextual, actionable insights to your end-users.

The Sample Solution: Python Teams App for Genie APIs

To help you get hands-on, this blog features a sample Teams app that demonstrates how to:

  • Connect Teams to Azure Databricks Genie via Azure AI Foundry using OBO (On-Behalf-Of) authentication.
  • Query and visualize data using Genie APIs and LLMs in a secure, governed manner.
  • Build and run the app locally using DevTunnel and easily extend it for production deployments.

Purpose:

The sample app is designed as a learning tool, enabling developers to explore the integration and build their own enterprise-grade solutions. It shows you how to wire up authentication, connect to Genie, and ask data-driven questions—all from within Teams.

Architecture Overview

Below is a logical architecture that illustrates the flow:

 

 

Key Steps from the Sample (posted on Github)

  1. Prerequisites:
    a. Familiarity with Azure Databricks, DevTunnel, Azure Bot Service, and Teams App setup.
    b. An AI Foundry project with Databricks and LLM connection.
  2. Configuration:
    a. Set up the DevTunnel for local development.
    b. Register and configure your bot and app in Azure.
    c. Create a connection in Azure AI Foundry to your Databricks Genie space.
    d. Provision storage with public blob access for dynamic chart/image rendering.
    e. Populate the `.env` file with all necessary IDs, secrets, and endpoints.
  3. Teams App Manifest:
    a. Create and configure the Teams app manifest, specifying endpoints, domains, permissions, and SSO details.
  4. Run and Test:
    a. Host the app locally, activate the virtual environment, and run the Python application.
    b. Upload your Teams app manifest and test conversational queries directly in the Teams client.
 
 



Sample Queries (Try these in the app!):

  • "Show the top sales reps by pipeline in a pie chart."
  • "What is the average size of active opportunities?"
  • "How many opportunities were won or lost in the current fiscal year?"

Get Started: Next Steps

To replicate this solution:

Final Thoughts

Thank you for reading! By integrating Azure Databricks, Azure AI Foundry, and Genie APIs, you can deliver powerful, secure, and collaborative data intelligence experiences right within Microsoft Teams.

Ready to go further?

Happy building! 🚀

Updated Aug 12, 2025
Version 1.0
No CommentsBe the first to comment