PHPackages                             redanlaxe/powerbi-embed-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. redanlaxe/powerbi-embed-php

ActiveLibrary[API Development](/categories/api)

redanlaxe/powerbi-embed-php
===========================

A PHP library to embed Power BI reports using the App Owns Data (service principal) method.

1.0.0(11mo ago)3262MITPHPPHP &gt;=7.1.0

Since Jul 30Pushed 11mo agoCompare

[ Source](https://github.com/redanlaxe/powerbi-embed-php)[ Packagist](https://packagist.org/packages/redanlaxe/powerbi-embed-php)[ RSS](/packages/redanlaxe-powerbi-embed-php/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (2)Versions (2)Used By (0)

Power BI Embed for PHP (Service Principal)
==========================================

[](#power-bi-embed-for-php-service-principal)

A PHP library to embed Power BI reports using the "App Owns Data" (service principal) method.

Installation
------------

[](#installation)

Install the package via [Composer](https://getcomposer.org/):

```
composer require redanlaxe/powerbi-embed-php
```

Usage
-----

[](#usage)

1. Create a configuration array with your Azure AD and Power BI details.

    ```
    // config.php
    return [
        'authenticationMode' => 'ServicePrincipal',
        'workspaceId' => 'YOUR_WORKSPACE_ID',
        'reportId' => 'YOUR_REPORT_ID',
        'tenantId' => 'YOUR_TENANT_ID',
        'clientId' => 'YOUR_CLIENT_ID',
        'clientSecret' => 'YOUR_CLIENT_SECRET',
        // ... and other settings
    ];
    ```
2. Instantiate the `PbiEmbedService` and get the embed parameters.

    ```
