Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Usage Milestone: Time Field for Drupal 8+ Module time_field crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Power BI Integration

89 sites Security covered Drupal 10–11
View on drupal.org

This project provides tools to integrate Power BI into Drupal, enabling access to Power BI's embed and RestAPI. It allows for embedding Power BI reports and dashboards within Drupal content.

Power BI

Provides tools to integrate Power BI into Drupal

What is it for?

These modules provide the tools to integrate Power BI into Drupal, with
the different modules you will be able to access the embed and RestAPI of PowerBi.
This is the process workflow and the role of each of the modules in it:

Dependencies

PowerBi Embed needs the PowerBi client from https://github.com/microsoft/PowerBI-JavaScript. There are three options to install it.

Preferred method:

PowerBi Embed provides a package.json to include the powerbi-client library. Make sure you have NPM of nodejs installed in your system and from the module folder, run `npm install`.

Alternatively, in your composer add the following script in your post-install-cmd scripts in order to install the
dependencies with each `composer install`.

{
  "scripts": {
    "post-install-cmd": [
      "npm install -C [path to module]"
    ]
  }

In the script above, it is assumed that the `pwbi` module is installed in the `web/modules/contrib` directory as
a relative path from the project root or where your `composer.json` is located. Adapt the path according to your installation.

Composer
You can use composer to download the powerbi js client by taking these steps:

1. Run the following command to ensure that you have the "composer/installers"
package installed:

composer require --prefer-dist composer/installers

2. Add the following to the "installer-paths" section of "composer.json":

"libraries/{$name}": ["type:drupal-library"],

3. Add the following to the "repositories" section of "composer.json":

 {
       "type": "package",
       "package": {
           "name": "microsoft/powerbi",
           "version": "2.1.19",
           "type": "drupal-library",
           "dist": {
               "url": "https://github.com/microsoft/PowerBI-JavaScript/archive/refs/tags/v2.19.1.zip",
               "type": "zip"
           }
       }
   }

4. Run the following command; you should find that new directories have been
created under "/libraries".

composer require --prefer-dist microsoft/powerbi

Alternative methods:

Manually download and install the library, from https://github.com/microsoft/PowerBI-JavaScript, in the `libraries` folder in the webroot, profile directory or site directory
within drupal. The package should be placed as such, so that the path looks like
`
/powerbi/dist/powerbi.min.js` where `
` is one of the directories mentioned above.

Usage

Power BI Authentication

1. Give permissions to configure the module (Administer Power BI configuration).
2. Configure access credentials: admin/config/pwbi/authentication_settings.
3. Include the service pwbi_authentication.authentication and use the method ::getAccessToken() to get the access token.
4. Use the access token on request to PowerBi Rest API.

Configure pwbi_embed

1. Configure available PowerBi workspaces: admin/config/pwbi/embed_settings
2. Create a Media Entity using the "PowerBi Embed" Media Type
3. Create Media content.

Customizing PowerBi embed

This module allows others to customize the js embedding process. This is achieved by
two events trigger before and after embedding:
1. PowerBiPreEmbed: This event is triggered before embedding the object and allows changing the configuration options,
using something like this:

    window.addEventListener("PowerBiPreEmbed",
        (e) => {
            const powerBiConfig = e.detail;
        }
    );

2. PowerBiPostEmbed: This event is triggered after embedding the object and allows changing the embedded object,
using something like this:

    window.addEventListener("PowerBiPostEmbed",
        (e) => {
        const powerBiReport = e.detail;
    }
);

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
5
Tracked since
Dec 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 5
Maintenance
Dormant

Release Timeline

Releases

Version Type Core Release date
2.0.3 Stable 10–11 Mar 31, 2025
2.0.2 Stable 10–11 Mar 21, 2025
2.0.1 Stable 10–11 Mar 21, 2025
2.0.0 Stable 10–11 Mar 19, 2025
1.0.2 Stable 10–11 Dec 17, 2024