Power BI

Overview

Power BI is a Microsoft business analytics platform that offers interactive visualizations and business intelligence tools. It enables users to create reports and dashboards. More importantly, it connects to all data sources within an enterprise required for deriving data based insights for business decisions.

The Power BI connector enables your Leena AI Agents to integrate with Power BI, allowing users to access insights from data conversationally via the virtual assistant and fetch data from specific reports in workflows as input for decision nodes.

API Details

Leena AI integrates with Power BI via REST APIs. The APIs allow Leena AI to create/delete a dataset or search within a dataset and get relevant details.

Documentation link: Microsoft Power BI REST API Documentation

Setup

The Power BI connector uses OAuth 2.0 authentication.

Prerequisites

Before setting up the Power BI connector, ensure you have:

  • Administrator access to your Azure Portal
  • Access to Microsoft Entra admin center
  • Ability to register applications in Azure Portal
  • Ability to assign API permissions for Power BI Service
  • Access to your Leena AI workspace with connector management permissions

Get credentials

Here is how to register an application and get credentials in Azure Portal:

  1. Register an Application in Azure Portal

    1. Go to the Microsoft Entra admin center and sign in with your Azure admin credentials
    2. Navigate to Microsoft Entra ID (in the left hand menu)
    3. Click App registration → New registration
    4. Enter the application name and redirect URL (optional)
    5. Click Register
  2. Generate a Client ID

    1. Go to Overview page after application registration is complete
    2. Copy the Application (client) ID
  3. Generate a Client Secret

    1. Navigate to Certificates and secrets
    2. Click New client secret
    3. Provide Description and Expiration Period (recommended: 1 year)
    4. Click Add to generate the client secret
    5. Copy and save the client secret (it will only be displayed once)

  4. Assign API Permissions

    1. Go to API Permissions
    2. Click Add a permission → Power BI Service
    3. Select required permissions
    4. Grant admin consent if needed from Add permissions
  5. Retrieve Tenant ID (for single tenant accounts)

    1. Open Microsoft Entra ID and select Overview
    2. Copy the Directory ID which is your Tenant ID

Add connection

Here is how to add a connection on Leena AI:

  1. Log in to your Leena AI workspace
  2. Navigate to Settings > Integrations
  3. Locate Power BI and click on 'Add connection'
  4. Provide the following details in the form:
    1. Connection Name: Enter a descriptive name for your connection
    2. Auth Type: OAuth 2.0
    3. Client ID: Application (client) ID from Azure
    4. Client Secret: Client secret generated in Azure
    5. Account Type: Select your account type (single tenant, multi-tenant, etc.)
    6. Tenant ID: Required only if account type is single tenant
  5. Click Next and add expiry for the credentials (same as what was entered during client secret generation)
  6. Submit the form to complete the connection setup