Forum Discussion

pulindu's avatar
pulindu
New Member
1 year ago
Solved

Integrating Power BI with React and .NET Using PPU Licenses

I have a requirement to integrate a Power BI report/dashboard into a web application registered in Azure AD.

The application has a React TypeScript front end and a .NET back end. Users authenticate using MSAL tokens. I currently have a Power BI Premium Per User (PPU) license but do not have a capacity-level or embedded license. All the users of this web app also have PPU licenses.

Is it possible to integrate the Power BI report/dashboard into the application? If so, what would be the recommended approach? I am looking for alternatives to using iframes.

  • Hi pulindu 

    To integrate a Power BI report/dashboard into your React + .NET app (without iframes) using Power BI Premium Per User (PPU):

    Steps:

    1. Authenticate Users:

      • Use MSAL tokens for Azure AD authentication.
    2. Backend (.NET):

      • Register an Azure AD app with Power BI Service API permissions (e.g., Report.Read.All).
      • Use the Power BI REST API to generate an embed token for the report.
    3. Frontend (React):

      • Use the Power BI JavaScript API (powerbi-client) to embed the report using the generated token.
      • Example: Dynamically render the report in a container with advanced features like interactions and event handling.

    Benefits:

    • Avoids static iframes.
    • Securely authenticates users with existing PPU licenses.
    • Provides advanced interactivity and customization for the embedded report.

     

    Did I answer your question? Mark my post as a solution, this will help others!

    If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

    Kind Regards,
    Poojara
    Data Analyst | MSBI Developer | Power BI Consultant
    Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS 

2 Replies

  • Hi pulindu 

    To integrate a Power BI report/dashboard into your React + .NET app (without iframes) using Power BI Premium Per User (PPU):

    Steps:

    1. Authenticate Users:

      • Use MSAL tokens for Azure AD authentication.
    2. Backend (.NET):

      • Register an Azure AD app with Power BI Service API permissions (e.g., Report.Read.All).
      • Use the Power BI REST API to generate an embed token for the report.
    3. Frontend (React):

      • Use the Power BI JavaScript API (powerbi-client) to embed the report using the generated token.
      • Example: Dynamically render the report in a container with advanced features like interactions and event handling.

    Benefits:

    • Avoids static iframes.
    • Securely authenticates users with existing PPU licenses.
    • Provides advanced interactivity and customization for the embedded report.

     

    Did I answer your question? Mark my post as a solution, this will help others!

    If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

    Kind Regards,
    Poojara
    Data Analyst | MSBI Developer | Power BI Consultant
    Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi pulindu ,

     

    Did Poojara_D12  response solve your problem? If solved, please mark the helpful answer as a solution this will help more people, if not please see if the following documents are helpful to you:

    Setting Up Azure for Analytics in Power BI and Emb... - Microsoft Fabric Community

    Embed Power BI report in a Power BI embedded analytics application for your customers - Power BI | Microsoft Learn

     

    Best Regards,

    Neeko Tang

    If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly.