CertSafari
    Databricks Certified Data Analyst Associate· Lessons

    Domain 7 · Lesson 33/39

    Distributing Genie Agents: embeds, apps, the Genie API, Slack and Teams

    Assign permissions via the UI and distribute Genie Agents (Genie spaces) using embedded links, external app integrations, and channel apps.

    13 min read
    3% of exam
    7 sources
    Published 2 Nov 2026
    Docs as of 31 Oct 2026

    What you will be able to do

    • Embed a Genie Agent as an iframe, naming the admin setting and the agent permission it needs
    • Connect a Genie Agent to a Databricks App or a custom integration through the Genie API with the right service principal and data grants
    • Set up the Genie channel apps for Slack and Microsoft Teams and control who sees responses in a channel

    1.Embedding a Genie Agent in another site

    Embedding puts a Genie Agent inside a tool people already use, such as a support console or an internal portal, so they can ask questions without going to Databricks. It needs three parties to act, and each one is a common point of failure.

    The workspace admin goes first. Genie Agents use the same embed allowlist as AI/BI dashboards, covered in Embedding via iframe and the admin embed allowlist. You set it under Settings > Security > External access, in the Embed dashboards drop-down, and that one setting covers both dashboards and Genie Agents. The policy can be Allow (any domain), Allow approved domains, or Deny. To embed an agent in a console at support.acme.internal, choose Allow approved domains, click Manage, and add that domain.

    The author goes second, and must hold at least CAN MANAGE on the agent. CAN RUN or CAN EDIT is not enough to produce embed code. They open the agent, click Share, click Embed space, and copy the iframe. Add allow="clipboard-write" so embedded users can copy CSV results and conversation links:

    Genie Agent iframe with clipboard access enabledhtml
    <iframe src="<your-genie-space-url>" allow="clipboard-write" width="100%" height="600"></iframe>

    End users are last, and the iframe gives them nothing they did not already have. Each person needs explicit access to the agent and to the data assets it uses, and anyone not signed in to Databricks is asked to authenticate first. Inside the frame they can send prompts but cannot change the agent's configuration. An embed that shows a sign-in prompt or empty answers usually means one of these grants is missing, not that the allowlist is broken.

    Checkpoint 1 of 7· Fill the gap

    Embedded users report that they cannot copy CSV results or conversation links out of the Genie Agent. Which value completes the iframe's allow attribute so they can?

    <iframe src="<your-genie-space-url>" allow=" ? " width="100%" height="600"></iframe>

    Checkpoint 2 of 7· Check yourself

    The workspace's Embed dashboards policy is set to Deny. A team wants to embed a Genie Agent in a console at support.acme.internal. What must the workspace admin do?

    Checkpoint 3 of 7· Exam question

    The BI team wants to embed a Genie space directly inside an internal customer-support console hosted at https://support.acme.internal, so agents can ask questions without leaving that tool. Before the Genie space author can generate a working embed, what must a workspace admin configure first?

    Checkpoint 4 of 7· Exam question

    An analyst who holds CAN RUN permission on a published Genie space opens the Share dialog and looks for the option to generate an embeddable iframe for the space, but the option is greyed out. What is the most likely cause?

    Sources12

    2.Adding a Genie Agent to a Databricks App

    A Databricks App can build its own interface around a Genie Agent by adding the agent as an app resource. When you create or edit the app, click + Add resource > Genie Agent, choose the agent, and pick a permission level. The levels are Can view (read configuration and metadata), Can run (submit queries and get responses), Can edit, and Can manage. An app that only asks questions needs Can run. Choosing a higher level breaks the rule of granting only what the app needs.

    These permissions go to the app's service principal, not to the people using the app. Access covers only the agent you selected, so an app that needs two agents needs two resources. The agent permission still does not cover data: the service principal also needs USE CATALOG, USE SCHEMA and SELECT on the tables and views the agent queries. Removing the resource takes away the service principal's access but leaves the agent unchanged for everyone else.

    The app finds out which agent to use from an environment variable. The resource key, genie-space by default, is mapped in app.yaml:

    app.yaml exposing the Genie Agent ID to the appyaml
    env:
      - name: GENIE_SPACE_ID
        valueFrom: genie-space # Use your custom resource key if different

    Checkpoint 5 of 7· Check yourself

    A team adds a Genie Agent to their Databricks App as an app resource at Can run. The app loads, but every question it sends comes back empty. What fixes this without granting more than the app needs?

    Sources3

    3.Custom integrations on the Genie API

    When the front end is your own chatbot, agent framework or application, the Genie Agents API is how you connect it. Call it over REST or through the Databricks SDKs. It has three groups of endpoints, each with different permission requirements:

    Genie API capability groups and the permissions they need
    API groupWhat it doesPermissions the caller needs
    Chat mode APIsStateful natural-language querying with follow-up questions and historyAt least CAN VIEW on the agent; SELECT on its Unity Catalog objects
    Agent mode APIsSend prompts in Agent mode, stream reasoning and SQL results, receive reports with citationsAt least CAN VIEW on the agent; SELECT on its Unity Catalog objects
    Management APIsCreate, configure and deploy agents across workspaces for CI/CDDatabricks SQL access entitlement; CAN USE on a pro or serverless warehouse; SELECT on the data; CAN EDIT on any agent you update

    How you authenticate decides whose permissions Genie applies. If a person is at a browser, use OAuth for users (U2M), and each answer is limited to that person's data. If no browser sign-in is possible, use a service principal (OAuth M2M), and every answer reflects what that service principal can read. A starting call through the SDK looks like this:

    Starting a Genie conversation with the Databricks SDK for Pythonpython
    # Initialize the workspace client
    w = WorkspaceClient()
    
    # Start a conversation with a natural language query
    response = w.genie.start_conversation_and_wait(
        space_id=space_id,
        content="What were our top-selling products last quarter?"
    )

    A correct integration does not fix a weak agent. The API returns whatever the agent's instructions and examples produce, so an incomplete or untested agent gives wrong answers through the API just as it does in the Genie UI.

    Checkpoint 6 of 7· Check yourself

    Your release pipeline calls the Genie Agents API to update the instructions and sample questions on an existing Genie Agent. It already has SELECT on the agent's tables. What else does the pipeline's identity need?

    Sources4

    4.Genie in Slack and Microsoft Teams

    The Genie channel apps bring Genie into Slack and Microsoft Teams, where people already talk. Both are in Public Preview, and both need an account admin to enable the preview in the account console before anyone installs them. Users can message the app directly or mention it in a channel (@Genie in Slack, @Databricks Genie in Teams). Each user then signs in to a Databricks workspace.

    Setting up the two Genie channel apps
    AspectSlackMicrosoft Teams
    Who installs itA Slack workspace administrator, using a direct URLA Microsoft 365 admin, from the Microsoft marketplace
    Channel configuration command/databricks-genie configconfig
    Start a fresh DM conversationStart a new chat in the appSend newchat
    Extra reachGroup DMs (new ones only)Microsoft 365 Copilot

    Both apps run on the Genie One API. By default Genie One sends each question to the most suitable agent. If a channel needs consistent answers for one use case, its owner sets the Genie scope to a specific Genie Agent, and Genie One then sends questions only to that agent. Data access works as it does in the Genie UI: each question runs with the credentials of the person who asked it.

    The visibility setting is where data leaks. Responses in a channel are public by default, and a public response is visible to every member, including members who cannot access the underlying data. Set visibility to private and only the person who asked sees the answer. Private replies also leave out visualization images. Visibility can be set at three levels, and a higher level overrides a lower one:

    • Workspace: a Databricks workspace admin sets Allow connection to collaboration platforms and Allow public messages in collaboration platforms in the workspace security settings. Turning public messages off makes every response private.
    • Channel: the channel owner runs the config command and selects Save as channel-wide setting.
    • Personal: an individual's own choice, used only when there is no channel-wide setting.

    Microsoft 365 Copilot can reach Genie in two ways: through the Teams app or through a Power Platform connection in Copilot Studio. Databricks recommends the Teams app because it is easier to set up and has lower latency.

    Checkpoint 7 of 7· Check yourself

    In a Slack channel that uses the Genie app, some members have no SELECT on the sales tables behind the pinned Genie Agent. The workspace allows public messages. The channel owner wants each answer seen only by the person who asked. What should the owner do?

    Sources567

    Practise it for real

    Wire an existing Genie Agent into a Databricks App so the app can ask it questions

    1. 1.Edit the app, and under App resources click + Add resource > Genie Agent. Choose your agent and set the permission level to Can run.

      Why: Can run is the lowest level that lets the app submit queries and receive responses.

      You should see: The resource is listed with the default key genie-space.

    2. 2.Grant the app's service principal USE CATALOG, USE SCHEMA and SELECT on the agent's tables and views.

      Why: The agent permission does not include data access, and Genie checks data access against the caller's identity.

      You should see: The service principal can read every table the agent uses.

    3. 3.Add an env entry to app.yaml with name GENIE_SPACE_ID and valueFrom genie-space.

      Why: This passes the agent's ID to the app without hardcoding it.

      You should see: After deployment, os.getenv("GENIE_SPACE_ID") returns the agent ID.

    4. 4.Call w.genie.start_conversation_and_wait with that space_id and a test question, then send a follow-up with create_message_and_wait.

      Why: This confirms the app can query the agent and that conversation context carries over.

      You should see: The response attachments contain Genie's answer, and the follow-up builds on the first question.

    Stuck? Get a nudge

    If answers come back empty, check the service principal's SELECT grants before you check the agent permission.

    Sources

    (7)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “This setting applies to both dashboards and Genie Agents.”
      ↩︎ Embedding a Genie Agent in another site
      “This setting applies to both dashboards and Genie Agents.”
      ↩︎ Exam trap 2
    2. 2.
      “Agent author: Must have at least CAN MANAGE permission on the Genie Agent.”
      ↩︎ Embedding a Genie Agent in another site
      “Users who are not signed in to Databricks are prompted to authenticate before they can interact with the embedded agent.”
      ↩︎ Embedding a Genie Agent in another site
      “Embedded Genie Agent users can send prompts but cannot edit the agent configuration.”
      ↩︎ Embedding a Genie Agent in another site
      “Agent author: Must have at least CAN MANAGE permission on the Genie Agent.”
      ↩︎ Exam trap 1
    3. 3.
      “Databricks grants your app's service principal the specified permissions on the selected Genie Agent.”
      ↩︎ Adding a Genie Agent to a Databricks App
      “This typically includes USE CATALOG, USE SCHEMA, and SELECT permissions on the relevant Unity Catalog tables and views.”
      ↩︎ Adding a Genie Agent to a Databricks App
      “When you remove a Genie Agent resource from an app, the app's service principal loses access to the agent.”
      ↩︎ Adding a Genie Agent to a Databricks App
    4. 4.
      “At least CAN VIEW permission on the Genie Agent.”
      ↩︎ Custom integrations on the Genie API
      “For production use cases where a user with access to a browser is present, use OAuth for users (OAuth U2M).”
      ↩︎ Custom integrations on the Genie API
      “Management APIs: Enable programmatic creation, configuration, and deployment of Genie Agents across workspaces.”
      ↩︎ Custom integrations on the Genie API
      “At least SELECT privileges on the Unity Catalog data objects that the agent uses.”
      ↩︎ Checkpoint
      “At least CAN EDIT permission on any existing Genie Agent that you update.”
      ↩︎ Checkpoint
    5. 5.
      “when a Genie Agent is pinned, Genie One sends the question to only that agent.”
      ↩︎ Genie in Slack and Microsoft Teams
      “Genie answers each question using the credentials of the Slack user who mentions @Genie”
      ↩︎ Genie in Slack and Microsoft Teams
      “A Slack workspace administrator must install the Databricks Genie app for Slack using a direct URL”
      ↩︎ Genie in Slack and Microsoft Teams
      “a Genie response is visible to everyone in the channel or group DM, including members who do not have access to the underlying data.”
      ↩︎ Exam trap 3
      “a Genie response is visible to everyone in the channel or group DM, including members who do not have access to the underlying data”
      ↩︎ Checkpoint
    6. 6.
      “A Microsoft 365 admin installs the Databricks Genie app in Microsoft Teams from the Microsoft marketplace”
      ↩︎ Genie in Slack and Microsoft Teams
      “When Allow public messages in collaboration platforms is off, all responses are private to the user who asked.”
      ↩︎ Genie in Slack and Microsoft Teams
    7. 7.
      “Databricks recommends connecting with the Databricks Genie app in Microsoft Teams.”
      ↩︎ Genie in Slack and Microsoft Teams

    Spotted a mistake, or was something unclear? Tell us.