Forum Discussion

JosephDaws's avatar
JosephDaws
Regular Visitor
2 years ago
Solved

Embed Power BI reports in Azure Static Web Apps

Hello, I was wondering if it is possible to embed a power BI report App owns Data in an Azure Static Web App or is it required that you use an App Services Web App. If not, is it possible to do a URL embedding in website/portal in a static web app. 

 

Thanks in advance. 

 

Best wishes, 

Joe

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi JosephDaws ,

     

    Yes, it is possible to embed Power BI reports in Azure Static Web Apps. You can refer to the following steps.

    1. Register an Application in Azure AD:

    - Go to the Azure portal and register a new application in Azure Active Directory.

    - Note down the Application ID and Tenant ID.

    2. Set API Permissions:

    - In the registered application, set the API permissions for Power BI Service.

    3. Generate a Client Secret:

    - Create a client secret for the registered application.

    4. Embedding Setup in Your Web App:

    - Use the Power BI JavaScript API to embed your reports.

    - Authenticate using the Application ID, Tenant ID, and Client Secret to get an access token.

    - Embed the Power BI report into your web pages using the access token. 

     

    As for embedding a URL in a static web app, it is possible to do so using an iframe. You can simply add an iframe element to your HTML code and set the src attribute to the URL you want to embed.

     

    For more information, please refer to

    Power BI embedded analytics overview - Power BI | Microsoft Learn

    Embed a report in a secure portal or website - 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. 

     

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi JosephDaws ,

     

    Yes, it is possible to embed Power BI reports in Azure Static Web Apps. You can refer to the following steps.

    1. Register an Application in Azure AD:

    - Go to the Azure portal and register a new application in Azure Active Directory.

    - Note down the Application ID and Tenant ID.

    2. Set API Permissions:

    - In the registered application, set the API permissions for Power BI Service.

    3. Generate a Client Secret:

    - Create a client secret for the registered application.

    4. Embedding Setup in Your Web App:

    - Use the Power BI JavaScript API to embed your reports.

    - Authenticate using the Application ID, Tenant ID, and Client Secret to get an access token.

    - Embed the Power BI report into your web pages using the access token. 

     

    As for embedding a URL in a static web app, it is possible to do so using an iframe. You can simply add an iframe element to your HTML code and set the src attribute to the URL you want to embed.

     

    For more information, please refer to

    Power BI embedded analytics overview - Power BI | Microsoft Learn

    Embed a report in a secure portal or website - 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.