<aside> 🧭

Navigation:


</aside>

Problem

In a Power Apps form within the Microsoft Power Platform, it would be necessary to embed a Power BI report when we want to display one. From a technical standpoint, the Power Platform’s Dataverse stores data in XML format, which includes a link to the Power BI service—specifically pointing to the report intended for display.

The issue arises when the GUID of the Power BI report stored in the Dataverse SQL database no longer matches the GUID of the report currently deployed in the Power BI environment.

When this mismatch occurs, the iframe fails to resolve the report correctly, resulting in a generic rendering error within the Power Apps form. This error typically appears during form load or refresh events, and provides little diagnostic information to the end user, making troubleshooting more complex.

To mitigate this, it is essential to implement validation mechanisms to ensure GUID consistency between the Dataverse and Power BI, or to design a dynamic lookup mechanism that retrieves the correct report ID at runtime based on metadata or report names.

image.png

Solution

The inability to capture an event on either platform—or to obtain an error log from Power Platform—becomes a critical factor in the decision-making process when choosing a solution.

To address this, a robust solution involves developing a background service that acts as a scheduled job rather than a real-time listener. This service would:

  1. Periodically query the Dataverse to retrieve the current report references (GUIDs or URLs).
  2. Validate these references against the actual reports available in the Power BI workspace using the Power BI REST API.
  3. Identify mismatches between stored GUIDs and active reports.
  4. Automatically update the Dataverse with the correct GUIDs or URLs when discrepancies are found.

This scheduled approach ensures consistency between the Dataverse and Power BI without introducing latency or complexity into the Power Apps runtime. It also avoids the overhead of implementing real-time event listeners or webhooks, which may not be necessary for this use case.

High Level Applicative Architecture with Azure Function or Executable

High Level Applicative Architecture with Azure Function or Executable

Details & Steps in the Solution

  1. The service (executable or Azure Function) retrieves the data stored in the DB SQL (Dataverse) in XML Format;
  2. The same service retrieves the mapping configuration stored in an environment (dataverse) used for specific configuration;
  3. Once the XML data is got, the service sets a proxy as a copy;
  4. The service retrieves the metadata related to Power BI report stored in a workspace (technically, in a group according the Power BI API);
  5. The service compares the proxy with the metadate proxy;
    1. If no differences, then no update in the DB SQL (Dataverse)
    2. otherwise, go the next step…
  6. The service builds the XML Format with the new metadata and stored the new data in the DB SQL (Dataverse);
  7. The service logs the message or the error generated by the process in the “Configuration” environment.

Architecture : details and steps

Architecture : details and steps